Neuroanatomy · WebGPU · Raymarched

Inside the brain

A human brain raymarched live on your GPU: its folded cortex lit up lobe by lobe, signals racing along the white-matter tracts, and a cut that shows grey matter wrapped over white. Pick a task and watch which regions light up.

Starting the GPU…

The regions

The wrinkled outer layer is the cerebral cortex, and two deep grooves divide it into lobes. The central sulcus runs from the crown down toward each ear. In front of it is the motor cortex, which sends movement commands. Behind it is the somatosensory cortex, which receives touch. Wilder Penfield mapped both strips in the 1930s by stimulating patients' brains during surgery. Each strip holds a distorted map of the body, with huge hands and lips. The lateral fissure separates the temporal lobe below it from the frontal and parietal lobes above it.

Two small areas on the left side are named after the doctors who linked them to language. Paul Broca found that damage near the back of the frontal lobe left patients understanding speech but barely able to produce it. Carl Wernicke found the opposite near the back of the temporal lobe: fluent speech that made little sense. In most people language sits mainly in the left hemisphere, so the model only marks them there. Turn the brain round to find them.

Tucked under the back is the cerebellum. It is a tenth of the brain's volume but holds about 80 percent of its 86 billion neurons, packed into the fine folds you can see. The brainstem below it keeps you breathing.

Tasks and tracts

Pick a task and the regions most associated with it light up. Signals then run along the main white-matter tracts, the bundles of insulated nerve fibres that carry them. Switch to X-ray to see them. Moving sends traffic down the corticospinal tract to the brainstem and loops it through the cerebellum. Seeing runs the optic radiation from deep in the brain back to the visual cortex. Speakinglights the arcuate fasciculus, which arches from Broca's area over to Wernicke's. The three arcs crossing the middle are the corpus callosum, the bridge between the two hemispheres.

Grey matter and white

Choose Cross-section and slide the cut through the brain. The cortex shows as a thin coloured rind, about 2.5 millimetres thick, which is about right for a real brain. It follows every fold. Underneath is the white matter, which is mostly wiring. Folding is how a sheet of cortex the size of a large napkin fits inside a skull.

How it is drawn

There is no 3D mesh here. The brain is a signed distance field: a formula that gives, for any point in space, how far it is from the brain's surface. The formula is a few ellipsoids blended together, carved with the two fissures and wrinkled with layered noise for the folds. For every pixel, the GPU steps a ray forward by that distance until it touches the surface. This is called sphere tracing, and the same formula then gives the lighting, the region outlines and the cut. The X-ray look instead collects light all the way through, so the folds on the far side glow too.

The signals are about 48,000 particles moved by a WebGPU compute shader. They travel faster along tracts whose regions are busier. Clicking a region asks the GPU the same question for the single ray under the pointer.

What this leaves out

  • The shape is schematic, not a scan. The folds are random and the boundaries are simple straight cuts. Real folds follow a common pattern, and real boundaries are mapped from tissue and imaging.
  • Tasks are textbook associations. Real tasks recruit networks spread across both hemispheres, and no region is ever completely idle.
  • The deep structures are missing. These include the thalamus, the basal ganglia, the hippocampus and the amygdala. The tracts are placed by eye, and the signals are far slower than real nerve impulses, which travel at up to about 120 metres a second.

Sources

  • Broca 1861 · P. Broca, Bull. Soc. Anat. Paris 36, 330 (1861): the case of "Tan" and the seat of articulate speech
  • Geschwind 1970 · N. Geschwind, Science 170, 940 (1970), "The organization of language and the brain": Wernicke's area and the arcuate fasciculus joining it to Broca's
  • Penfield & Boldrey 1937 · W. Penfield and E. Boldrey, Brain 60, 389 (1937): stimulating the motor and sensory strips, and the homunculus
  • Catani & Thiebaut de Schotten 2008 · M. Catani and M. Thiebaut de Schotten, Cortex 44, 1105 (2008): a tractography atlas of the white-matter tracts
  • Azevedo et al. 2009 · F. A. C. Azevedo et al., J. Comp. Neurol. 513, 532 (2009): 86 billion neurons, about 80 percent of them in the cerebellum
  • Fischl & Dale 2000 · B. Fischl and A. M. Dale, PNAS 97, 11050 (2000): the cerebral cortex is about 2.5 mm thick
  • Hart 1996 · J. C. Hart, The Visual Computer (1996), "Sphere tracing": raymarching signed distance fields, the technique drawing it