Reaction-Diffusion Explorer
Reaction-diffusion systems describe how two or more chemical substances spread through space while reacting with each other. The Gray-Scott model simulated here tracks two concentrations: a substrate u that is continuously fed in, and an activator v that is continuously removed. When u and v meet, they react: v catalyzes the conversion of u into more v, consuming u in the process.
The equations are deceptively simple:
∂u/∂t = Du∇²u − uv² + f(1 − u)
∂v/∂t = Dv∇²v + uv² − (f + k)v
Du and Dv are diffusion rates — how fast each substance spreads. f is the feed rate (how fast fresh u is supplied), and k is the kill rate (how fast v decays). The interplay between diffusion, reaction, feed, and kill produces an astonishing variety of stable patterns.
In 1952, Alan Turing published "The Chemical Basis of Morphogenesis", one of the last papers of his life and arguably his most visionary. He proposed that biological patterns — the stripes on a zebra, the spots on a leopard, the whorls on a fingerprint — could arise from nothing more than two chemicals diffusing and reacting.
The key insight is that if one substance (the activator) diffuses slowly and the other (the inhibitor) diffuses fast, spontaneous pattern formation is inevitable. Small random fluctuations get amplified: the activator reinforces itself locally while the fast-diffusing inhibitor suppresses it at a distance, creating peaks and troughs that crystallize into stable patterns.
Turing called these stationary waves. Today we call them Turing patterns. They have been confirmed in chemistry (the Belousov-Zhabotinsky reaction), in the skin pigmentation of tropical fish, in the ridges of sand dunes, and in the distribution of vegetation in arid ecosystems.
This simulator starts with a uniform field of substrate u. When you click to add a seed of activator v, the autocatalytic reaction u + 2v → 3v ignites locally. The activator spreads and self-organizes according to the feed and kill rates. Small changes in f and k push the system through phase transitions — from spots to stripes to pulsing waves to chaos — a whole taxonomy of form from two numbers.
Try the presets, then nudge the sliders. The patterns are not programmed in. They emerge.