🐆 Turing Reaction-Diffusion Patterns
Watch Alan Turing's reaction-diffusion equations generate biological patterns: spots, stripes, and labyrinths. Adjust diffusion rates and reaction kinetics to see morphogenesis emerge.
About Turing Patterns
This simulation reproduces the spontaneous biological patterns Alan Turing described in 1952, using the Gray-Scott reaction-diffusion model. Two virtual chemicals — activator A and inhibitor B — spread and react across a 400×400 grid, governed by ∂A/∂t = DA∇²A − AB² + F(1−A) and ∂B/∂t = DB∇²B + AB² − (F+K)B. The autocatalytic AB² term lets B breed while consuming A.
It runs entirely on your GPU as a WebGL fragment shader, advancing every cell each frame with a 9-point Laplacian. The Feed (F) and Kill (K) sliders, plus presets for leopard spots, zebra stripes, coral labyrinths and giraffe patches, tune which pattern emerges; palette and speed controls and click-to-paint let you steer it. The same maths is thought to set animal markings and embryonic digit spacing.
Frequently Asked Questions
What is a Turing pattern?
A Turing pattern is a spontaneous, repeating arrangement such as spots, stripes or maze-like labyrinths that emerges from two interacting chemicals diffusing across a surface. Alan Turing proposed in 1952 that this reaction-diffusion mechanism could explain how uniform tissue self-organises into structured biological markings.
What model does this simulation actually use?
It uses the Gray-Scott model, a well-known reaction-diffusion system of the Turing type. Two chemical fields, an activator A and an inhibitor B, evolve on a 400 by 400 grid according to coupled partial differential equations with the nonlinear reaction term AB squared.
What do the Feed and Kill sliders do?
The Feed rate F controls how quickly chemical A is replenished, and the Kill rate K controls how quickly chemical B is removed. Together these two numbers decide which pattern forms: small changes shift the result between spots, stripes, labyrinths and patchy giraffe-like shapes.
Why do patterns appear at all?
Turing showed that when an inhibitor diffuses faster than an activator, a near-uniform state becomes unstable. Short-wavelength disturbances grow while long ones fade, so the system settles into a periodic structure with a characteristic spacing rather than staying flat.
What are the activator and inhibitor here?
Chemical A acts as the activator and chemical B as the inhibitor. In the Gray-Scott equations B is autocatalytic through the AB² term, meaning it promotes its own production while consuming A, and the displayed colour maps the concentration of B.
How does the simulation compute each step?
It runs on the GPU using two ping-ponged WebGL float textures that store the A and B fields. A GLSL fragment shader updates every cell in parallel each frame, using a weighted 9-point Laplacian to approximate diffusion before applying the reaction terms.
What do the presets correspond to?
Each preset loads a tuned pair of Feed and Kill values. Spots uses about F 0.035 and K 0.065, stripes about 0.022 and 0.051, labyrinth about 0.029 and 0.057, and giraffe about 0.039 and 0.058. Moving a slider switches you to Custom.
Can I draw into the simulation?
Yes. Clicking or dragging on the canvas paints fresh blobs of chemical B under the cursor, which then react and spread according to the current Feed and Kill settings. The Re-seed button scatters new random blobs and Reset restarts from the spots preset.
Is this physically accurate?
It is a faithful numerical solution of the Gray-Scott equations, which are a recognised mathematical model of Turing-type pattern formation. It is a simplified abstraction rather than a literal map of any specific biological reaction, but it captures the essential activator-inhibitor mechanism correctly.
Where do Turing patterns appear in real life?
The same reaction-diffusion mathematics is thought to underlie animal coat markings such as leopard spots and zebra stripes, the ridged surface of coral and brain tissue, and the regular spacing of fingers. In 2012 researchers confirmed Turing-like chemistry helps set digit spacing in mouse paws.
Explore the mesmerizing formation of patterns in reaction-diffusion systems, mimicking biological processes like animal coat development. Adjust parameters to control the emergence and evolution of spots, stripes, and complex labyrinths on a dynamic grid.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install