Generate animal coat patterns — spots, stripes, labyrinths — using Alan Turing's reaction-diffusion model (Gray-Scott variant). Two chemical species, activator and inhibitor, interact to produce self-organised spatial patterns. Click on the canvas to seed new patterns.
Click / drag on canvas to paint activator. Patterns emerge in 5–30 seconds.
Steps: 0
F: 0.035
k: 0.065
Du/Dv: 2.0 / 1.0
Physics
The Gray-Scott model: ∂u/∂t = Du·∇²u − u·v² + F(1−u); ∂v/∂t = Dv·∇²v + u·v² − (F+k)v. Chemical u (blue) is fed in at rate F and consumed by the reaction u·v². Chemical v (red) is produced by u·v² and killed at rate k.
Turing instability: small perturbations grow when the inhibitor diffuses much faster than the activator (Dv >> Du). The pattern wavelength depends on the ratio of diffusion rates. Different F/k combinations yield spots, stripes, labyrinths, or worms — the same patterns seen on leopards, zebrafish, and seashells.
About Turing Reaction-Diffusion Patterns
In his landmark 1952 paper "The Chemical Basis of Morphogenesis," Alan Turing proposed that two interacting chemical species — an activator and a faster-diffusing inhibitor — could spontaneously break spatial symmetry and produce periodic patterns. This counter-intuitive mechanism, now called Turing instability, is thought to underlie pigmentation patterns on animal coats (leopard spots, zebra stripes, angelfish markings) and skeletal patterning in vertebrate limbs. The Grey-Scott model used here captures the same physics: chemical u is fed in at rate F and consumed by the reaction u·v²; chemical v is produced by the same reaction and killed at rate k.
Adjust the feed rate F and kill rate k to navigate the parameter space and watch the canvas self-organise into spots, stripes, labyrinths, or worms over tens of seconds. Click or drag on the canvas to seed new activator patches and observe how patterns propagate outward from each disturbance.
Frequently Asked Questions
What is Turing instability and why is it surprising?
A Turing instability occurs when a spatially uniform steady state is stable without diffusion but becomes unstable when diffusion is added — the opposite of the usual expectation that diffusion smooths things out. The key requirement is that the inhibitor diffuses significantly faster than the activator (Dᵥ > Dᵤ). Small random fluctuations then grow into a periodic spatial pattern with a characteristic wavelength set by the ratio of diffusion rates.
What do the feed rate F and kill rate k control?
In the Grey-Scott model, F determines how quickly fresh activator (u) is supplied to the system, while k sets how quickly the product (v) is removed. Different (F, k) pairs produce qualitatively different patterns: low F and moderate k give isolated spots; higher F generates stripes or labyrinths; certain combinations produce travelling waves or "worms." The boundary between pattern types is called the Turing space.
What are the actual equations governing this simulation?
The Grey-Scott model: ∂u/∂t = Dᵤ·∇²u − u·v² + F(1 − u) and ∂v/∂t = Dᵥ·∇²v + u·v² − (F + k)v. The term u·v² is the autocatalytic reaction: v catalyses its own production at the expense of u. Here Dᵤ = 0.2097 and Dᵥ = 0.1050, giving a diffusion ratio of 2:1 sufficient to trigger the instability in the right (F, k) region.
Do Turing patterns actually appear in real animals?
Strong experimental evidence supports Turing-type mechanisms in biology. The periodic spacing of hair follicles in mice requires interactions matching activator-inhibitor kinetics. Angelfish (Pomacanthus) repaint their stripes as they grow, consistent with a Turing mechanism rescaling with body size. Zebrafish pigmentation involves exactly two interacting cell types — xanthophores (activator) and iridophores (inhibitor) — whose removal and transplantation experiments match Turing predictions.
How does the simulation discretise the equations?
The canvas is a 200×200 grid with periodic (wrap-around) boundary conditions. At each time step the Laplacian ∇²u is approximated with the 5-point finite-difference stencil: ∇²u ≈ u(x−1,y) + u(x+1,y) + u(x,y−1) + u(x,y+1) − 4u(x,y). The reaction-diffusion update is then applied explicitly with a fixed time step Δt = 1. Running multiple steps per animation frame (the speed slider) accelerates pattern formation without changing the final equilibrium.
What is the characteristic wavelength of a Turing pattern?
The wavelength of the emergent pattern is determined by the diffusion coefficients and reaction rates. From linear stability analysis, the most-amplified wavenumber q* satisfies q*² ≈ √(fᵤhᵥ/DᵤDᵥ), where fᵤ and hᵥ are partial derivatives of the reaction terms at the steady state. Increasing the diffusion ratio Dᵥ/Dᵤ shrinks the wavelength (finer spots); decreasing it can suppress pattern formation entirely.
What other models produce similar patterns?
The Gierer-Meinhardt model (1972) is the classical activator-inhibitor formulation used in developmental biology. The FitzHugh-Nagumo model produces Turing-like patterns and is also a simplified model of neural excitability. The Schnakenberg and Brusselator models are common in theoretical biology. All share the key requirement: a local positive-feedback activator paired with a long-range negative-feedback inhibitor that diffuses faster.
Why do patterns take 5–30 seconds to emerge?
Turing instability grows from microscopic noise, so it takes many time steps for spatial modes to amplify to a visible amplitude. The growth rate σ of the fastest-growing mode is typically a small fraction of the reaction time scale, meaning thousands of iterations are needed before the pattern saturates. The "speed" slider multiplies the steps per frame, letting you choose between watching the slow natural emergence or accelerating to the final state.
Can Turing patterns form in 3D?
Yes. Three-dimensional Turing instabilities produce spherical spots, cylindrical tubes, or laminar sheets depending on parameters — analogous to the 2D spot/stripe dichotomy. In developmental biology, 3D Turing mechanisms have been proposed for branching morphogenesis in the lung and kidney, chondrogenesis (cartilage patterning), and the regular spacing of teeth. Computational simulations in 3D require far more memory but reveal rich volumetric structure invisible in 2D.
What happens at the boundary of the Turing space?
At the edges of the (F, k) parameter region that supports patterns, the system undergoes bifurcations. Near the lower boundary, spots nucleate slowly and remain isolated. Near the upper boundary, patterns become irregular or collapse into a uniform state. Certain parameter values produce "self-replicating spots" that split when they grow too large — a phenomenon linked to the soliton-like solutions of the Grey-Scott model described by Pearson (1993).