Reaction Diffusion Dynamics (2D)

Gray-Scott pattern lab: feed and kill rates grow spots, mazes and mitosis; draw seeds with the pointer.

Switch to 3D

Presets

Playback

Reaction

Feed and kill rates choose the pattern; the two diffusion constants control its scale.

Numerics and brush

Explicit time step, steps per frame and the seed brush.

Layers

Model checks

The science

The Gray-Scott model

Two species U (nutrient) and V (activator) diffuse and react: dU/dt = Du lap(U) - U V^2 + F (1 - U) and dV/dt = Dv lap(V) + U V^2 - (F + k) V. The autocatalytic term U V^2 turns U into more V; F feeds U from a reservoir and removes both species, k is an extra kill rate of V. The Laplacian is the periodic 5-point stencil, time stepping is explicit Euler (stable for dt (4 Du) < 1).

Why patterns appear

Because U diffuses about twice as fast as V (Turing mechanism: a fast inhibitor-like supply and a slow activator), a uniform state becomes unstable and spots, stripes or mitotic splitting grow. Different (F, k) pairs give the classic families shown by the presets. The well-mixed fixed points solve (F + k) V^2 - F V + F (F + k) = 0, U = (F + k) / V; they exist only when F >= 4 (F + k)^2 (saddle-node curve in the map).

Measurements

The dominant wavelength is the peak of the radially averaged power spectrum of V from a radix-2 FFT of the 128 x 128 grid. Active area counts cells with V above 0.15.

Simplifications

Dimensionless units (grid spacing 1), the simplest two-species autocatalytic scheme, no real chemistry constants. It illustrates pattern formation (as in animal coats, Belousov-Zhabotinsky-type systems) rather than predicting a specific reaction.

What to try
  • Click a preset, then press Restart and watch how spots multiply (Mitosis) or form a maze (Labyrinth).
  • Drag across the picture to drop V seeds; in the Spots regime they split and fill the space.
  • Raise k at fixed F until V dies out: the white dot leaves the pattern-forming region of the map.
  • Lower Dv toward Du: pattern vanishes because the Turing condition is lost.
Mean concentrations over time
Radial power spectrum of V
Feed/kill map with saddle-node curve
Histogram of V