What you're seeing
The canvas holds two invisible chemicals, U and V, one concentration value per cell. They do only two things: they diffuse — spreading into neighboring cells — and they react — V consumes U to make more of itself, while V slowly decays away. Start from a near-uniform sea of U with a few specks of V, and nothing should happen: a perfectly mixed broth has no reason to develop a pattern. Yet it does. Dots appear, grow, split, and arrange themselves into spots, worms, or a maze, then hold that texture indefinitely. No cell is told to make a spot; the spots are a property of the whole field, not of any part of it.
The rule
Each cell updates from its neighbors every tick by the Gray–Scott equations:
- U spreads out, is eaten by the reaction (it loses an amount proportional to
U·V²), and is topped up by a feed termf·(1−U)that refills the tank toward 1. - V spreads out — but more slowly — gains exactly what U lost (
+U·V²), and is removed by a kill term(f+k)·Vthat drains it toward 0.
"Spreading out" is a Laplacian: each cell relaxes toward a weighted average of its eight neighbors,
computed here as a 3×3 stencil on a grid that wraps at the edges (a torus). The reaction U·V²
is autocatalytic — V helps make more V — so V behaves like a self-amplifying
activator, while the feed/kill balance acts as a slower inhibitor that
stops it from taking over. (Strictly, Gray–Scott is a substrate-depletion system — V eats the
fed substrate U — rather than a classic activator–inhibitor pair, but it produces the same behavior.)
The key idea, due to Alan Turing, is counter-intuitive: diffusion, which we think of as the great smoother, can instead create structure. If the inhibitor diffuses faster than the activator, a small clump of activator builds itself up locally while seeding a ring of suppression around it — short-range activation, long-range inhibition. A flat, stable mixture becomes unstable to that pattern and crystallizes into evenly spaced spots or stripes. This is a Turing instability, and the wavelength it selects sets the spacing of the dots. In our model the two diffusion rates differ by exactly this kind of factor (U spreads about twice as fast as V), and the feed and kill knobs slide you across the resulting catalog of patterns.
Why it matters
Reaction–diffusion is the founding mathematical theory of biological pattern formation — morphogenesis. In 1952 Turing proposed that an embryo, starting from a nearly uniform ball of cells, could break its own symmetry through chemical "morphogens" diffusing and reacting, with no blueprint and no external guide. It was a startling claim: that the spacing of a tiger's stripes or the arrangement of a flower's parts could be a consequence of chemistry and geometry rather than a pre-drawn map. The Gray–Scott system you are watching is a particularly rich member of this family; Pearson's 1993 survey of it catalogued a whole zoo of self-replicating spots, mazes, and chaotic regimes inside a single two-parameter rule.
The deeper lesson is the same one this Atlas keeps finding: global order from local interaction. Here the surprise is sharper, because the ingredient that produces the order — diffusion — is exactly the one our intuition says should destroy it.
In the wild
Turing-type mechanisms are a leading explanation for many regular biological patterns. It is important to separate the model (two abstract chemicals on a grid) from the mechanism (specific molecules, cells, and genes), and to be honest about how firmly the two are linked:
- Animal coat markings — spots and stripes on big cats, dappling, and the way a pattern's character changes with the size and shape of the body part it grows on are classic targets of Turing modeling (Murray). The models reproduce the patterns convincingly, but for most mammals the actual morphogens are not fully identified — the link is suggestive, not proven.
- Fish skin is the strongest confirmed case: the moving stripes of the zebrafish rearrange exactly as a Turing system predicts, and Kondo and Miura traced this to interacting pigment cells rather than diffusing chemicals — a reaction–diffusion system built from cells, showing the mathematics can be right even when the physical players differ from Turing's original picture.
- Seashell pigmentation patterns are well modeled by reaction–diffusion running along the one-dimensional growing shell lip, laying down a record of the dynamics over time.
- Skin appendages — the spacing of hair follicles and feather buds, and the ridges of fingerprints — show Turing-like periodicity, and in several cases specific activator/inhibitor signaling molecules have been identified.
- Vegetation in arid landscapes self-organizes into strikingly regular spots, stripes, and labyrinths (so-called tiger bush) through a water-mediated activation–inhibition that is mathematically a reaction–diffusion process.
So: the framework is real and, in a handful of systems, demonstrated down to the molecules. For many headline examples — including most "Turing pattern on an animal" claims — it remains a powerful and well-supported hypothesis rather than a settled fact. Gray–Scott itself is a toy: it teaches the idea, not the biochemistry of any particular creature.
Try this
- Start on Mitosis and watch spots grow until they pinch in two — a striking visual echo of cell division, produced by pure chemistry.
- Switch to Maze, let it fill, then nudge kill up by a hair: the corridors thin and break into isolated Spots. The patterns live on a continuum, and the sliders walk you across it.
- Choose Waves / U-skate for travelling fronts and gliding solitons instead of a frozen texture — the same rule, a very different regime.
- On any preset, drag across the canvas to inject V, then watch the pattern reorganize around your stroke. Press randomize to re-seed and see how a different start finds the same characteristic spacing.
References
- Turing, A. M. (1952). "The Chemical Basis of Morphogenesis." Philosophical Transactions of the Royal Society of London B, 237(641), 37–72.
- Gray, P. & Scott, S. K. (1984). "Autocatalytic reactions in the isothermal, continuous stirred tank reactor: Oscillations and instabilities in the system A + 2B → 3B; B → C." Chemical Engineering Science, 39(6), 1087–1097. (See also their 1983 and 1985 companion papers.)
- Pearson, J. E. (1993). "Complex Patterns in a Simple System." Science, 261(5118), 189–192.
- Murray, J. D. (2003). Mathematical Biology II: Spatial Models and Biomedical Applications (3rd ed.). Springer. (Coat-pattern and morphogenesis modeling.)
- Kondo, S. & Miura, T. (2010). "Reaction-Diffusion Model as a Framework for Understanding Biological Pattern Formation." Science, 329(5999), 1616–1620.