Turing Pattern LabBeta
Watch two reacting chemicals paint Turing patterns on their own
This tool is a beta version still being stabilized. Please let us know if a result looks off.
Two imaginary chemicals, U and V, spread out and react (U + 2V → 3V). U is fed in continuously (F) and V is removed (k). Because V diffuses more slowly than U, the uniform state breaks up and the patterns Alan Turing predicted appear on their own. Small changes to F and k give completely different results: spots, stripes, mazes, dividing cells. Drag on the canvas to drop seeds.
Working…
0.0
It hasn't frozen — the result will appear when the calculation finishes.
About Turing Pattern Lab
This tool integrates the Gray–Scott reaction–diffusion equations on a square grid. Each cell holds two concentrations, u and v, updated every step as u' = Du∇²u − uv² + F(1−u) and v' = Dv∇²v + uv² − (F+k)v. The uv² term is the reaction U + 2V → 3V; F is the rate at which fresh U is fed in, and k is the extra rate at which V is removed. The Laplacian is a 3×3 stencil (centre −1, edges 0.2, corners 0.05), the time step is 1, and the grid wraps around at the edges. The default diffusion rates, Du = 1.0 and Dv = 0.5, match Karl Sims's widely copied tutorial setup.
An empty dish is u = 1, v = 0 everywhere, and that state never changes by itself. Nothing happens until you drag on the canvas to drop a little V. That is why two runs with the same F and k can look different at first: the seeds differ. Given enough time, the dish either settles into the pattern characteristic of that (F, k) point or keeps churning forever.
What Turing actually proposed in 1952
In “The Chemical Basis of Morphogenesis” (1952), Alan Turing argued that a few chemicals — he called them morphogens — reacting with each other and diffusing through tissue could turn an initially uniform tissue into a patterned one. Diffusion normally smooths differences out. Turing's insight was that when two substances diffuse at different speeds, diffusion can instead make the uniform equilibrium unstable, so tiny random fluctuations grow into a pattern with a characteristic spacing. This is now called a diffusion-driven or Turing instability.
You can check the key ingredient here. Raise Dv until it equals Du (1.0). Running the same update rule offline for 10,000 steps, the seeds at the Mitosis, Maze and δ points all fade away completely at Dv = 1.0 and the dish returns to empty; with Dv = 0.5 the same seeds grow into patterns. Turing himself never used the Gray–Scott model — that reaction scheme came out of chemical-reactor research in the 1980s — but John Pearson's 1993 paper, which added diffusion and ran it on a grid, is the version everyone plays with today.
Reading the F–k map: where a second uniform state exists
Drop the diffusion terms and solve for steady states. Besides the trivial u = 1, v = 0, there is a solution with uv = F + k, but only if F ≥ 4(F + k)², which rearranges to k ≤ √F/2 − F. That is the hump-shaped curve in Pearson's F–k diagram. Its peak sits at F = k = 1/16 = 0.0625.
Measuring the presets against that curve is revealing. “Mitosis” (F = 0.0367, k = 0.0649) lies to the right of the curve, whose value there is √0.0367/2 − 0.0367 ≈ 0.0591. In other words, no uniform state with V survives at that point — yet individual spots copy themselves and fill the dish. “Coral” (F = 0.0545, k = 0.062) sits just inside the curve (≈ 0.0622), and “Maze” (F = 0.029, k = 0.057) just outside it (≈ 0.0561). Most of the famous patterns crowd into a thin band near this line, which is the single most useful thing the map tells you.
Finding Pearson's pattern classes in this tool
Pearson labelled the patterns he found with Greek letters, and Robert Munafo later extended the scheme and catalogued representative coordinates on his xmorphia site. Every value below falls inside this tool's input range (F 0–0.1, k 0.03–0.075), so you can type them straight into the number boxes. The grid spacing and diffusion scaling here are not identical to Pearson's original runs, so points near a class boundary may behave like a neighbouring class.
- α (F 0.010, k 0.047): chaos of short-lived wavelets and spiral fragments
- β (F 0.014, k 0.039): chaotic waves with holes opening and closing
- γ (F 0.022, k 0.051): wriggling worms and branching stripes that never settle
- δ (F 0.030, k 0.055): V covers the dish and holes (“negative spots”) pack into a hexagonal array — the region Pearson called true Turing patterns
- ε (F 0.018, k 0.055): spots that divide until overcrowded patches die off
- θ (F 0.030, k 0.057): spots grow into rings and end as a connected stripe network
- κ (F 0.050, k 0.063): stripes that thicken sideways into a hedgerow maze
- λ (F 0.026, k 0.061): spots multiplying by division into a hexagonal grid
- μ (F 0.046, k 0.065): worms growing from their tips, lining up in parallel
- ξ (F 0.010, k 0.041): large, long-lived spirals (one of Munafo's added classes)
Things to watch for
Sort what you see into patterns that freeze and patterns that keep moving. δ and λ become an almost static lattice after a few thousand steps; α, β and ξ never stop. Even among spot patterns the dynamics differ: in ε the spots keep dividing into empty space until a crowded region collapses all at once, and the cycle repeats.
A clean experiment is to fix F and nudge only k. At F = 0.03, moving k from 0.055 to 0.057 to 0.062 takes you from a lattice of holes, through rings and networks, to sparse isolated spots. Push k far to the right of the curve and V can no longer sustain itself; the dish decays back to empty.
Du and Dv are capped at 1.0 for a numerical reason. The solver takes a single explicit Euler step per iteration, and with this stencil larger diffusion rates make the values blow up rather than spread.
Worked examples
Showing that Mitosis lies outside the curve
- Input
F = 0.0367, k = 0.0649- Output
Boundary k* = √0.0367 / 2 − 0.0367 ≈ 0.0958 − 0.0367 = 0.0591
Since 0.0649 > 0.0591, there is no non-trivial uniform state here, yet the dish fills with dividing spots. The spots are self-sustaining local structures, not the break-up of a uniform state.
Removing the diffusion difference
- Input
Mitosis (F 0.0367, k 0.0649), Du 1.0, 8 seeds on a 128×128 grid, 10,000 steps- Output
Dv 0.5: about 50 separate spots / Dv 1.0: V vanishes entirely (mean v = 0)
Equal diffusion removes the precondition for a Turing instability. One slider demonstrates that the ratio of diffusion rates, not the reaction alone, is what creates the pattern.
κ versus μ
- Input
κ: F 0.050, k 0.063 / μ: F 0.046, k 0.065- Output
κ stripes thicken sideways into a maze; μ stripes grow from their tips and line up in parallel.
The points are only 0.004 apart in F and 0.002 in k, both just right of the boundary curve, yet the growth direction flips.
How to use it
- Pick a preset or click the F–k map to choose a point.
- Drag on the canvas to drop V seeds and let it run for a few thousand steps.
- Type F and k into the number boxes to visit the class coordinates above.
- Change Du and Dv to see how the diffusion ratio shapes the pattern.
Key terms
- Turing instability
- A uniform equilibrium that becomes spatially unstable because two interacting substances diffuse at different rates.
- Feed rate F
- How fast U is replenished from an outside reservoir; the same rate also washes out both U and V.
- Kill rate k
- The additional removal rate of V. V's total loss rate is F + k.
- Periodic boundary
- The right edge connects to the left and the top to the bottom, so patterns are never cut off at the border.
Frequently asked questions
Is this really how zebra stripes and leopard spots form?
Turing's mechanism is a leading framework for animal markings, but the actual molecules involved have to be identified species by species. Gray–Scott is not the chemistry of any animal; it is one of the simplest models that shows how such patterns can arise at all.
The canvas stays blank.
The state u = 1, v = 0 is stable on its own, so you need to drop seeds by dragging. If seeds appear and then fade, k is too far to the right of the boundary curve — lower it.
My pattern is a different size from what another site shows for the same F and k.
F and k decide the type of pattern, but the spacing depends on the diffusion rates and the grid scale. This tool uses Du 1.0, Dv 0.5 and one grid cell as the unit length.
The pattern never stops changing. Is something wrong?
No. Regions such as α, β and ξ never settle. Complex, ever-changing behaviour from a two-line equation is exactly the point of Pearson's paper.
Sources
- A. M. Turing, The chemical basis of morphogenesis, Phil. Trans. R. Soc. B 237, 37–72 (1952)
- J. E. Pearson, Complex patterns in a simple system, Science 261, 189–192 (1993) — arXiv:patt-sol/9304003
- R. Munafo, Pearson's classification (extended) of Gray-Scott parameter values (xmorphia)
- Karl Sims, Reaction-Diffusion Tutorial
Last reviewed: