Gray-Scott

step 0
Loading the engineShared by all simulations, so the next one opens instantly.
The physics

The Gray-Scott model describes two chemicals spread over a surface: a substrate u that is fed in from outside, and a catalyst v that consumes it to make more of itself and is slowly removed. In 1993 John Pearson surveyed its two rate constants systematically, the feed rate f and the kill rate k, and found a wide range of patterns: dividing spots, stripes, labyrinths, spiral waves and chaos. Reaction-diffusion systems of this kind are studied as models for animal coat markings and for the banded vegetation of dry regions.

Governing equation

∂u∂t=Du∇2u−uv2+f(1−u),∂v∂t=Dv∇2v+uv2−(f+k)v.

The reaction is u+2v→3v: it takes two molecules of v to convert one of u, which makes v autocatalytic. The substrate is replenished at rate f, and v is removed at rate f+k. With the default coefficients, Du=0.2097 and Dv=0.1050 (Pearson’s values in grid units), the substrate spreads twice as fast as the catalyst. A patch of v therefore stays compact while it drains the substrate around it, and that is what lets patterns form. The grid is advanced with explicit Euler steps, Δt=Δx=1, and its edges wrap around.

What you see

The color shows the concentration of v. Every run starts from u=1, v=0 with a noisy square of mixed concentrations in the center, and is run for 200 steps with the mitosis values before the chosen f and k take over.

Each preset is one point in the (f,k) plane, named after the pattern it is set up to show:

  • mitosis: f=0.0545, k=0.062
  • coral: f=0.058, k=0.065
  • maze: f=0.029, k=0.057
  • spots: f=0.030, k=0.062
  • worms: f=0.046, k=0.063
  • u-skate: f=0.062, k=0.0609, small U-shaped structures that glide across the grid
  • fingerprints: f=0.037, k=0.060
  • spirals: f=0.018, k=0.051

Small changes matter: all eight lie within 0.014 of each other in k.

Parameters

feed rate f: how fast the substrate is replenished from outside, 0.01 to 0.09.

kill rate k: how fast the catalyst is removed, 0.04 to 0.075. Too high a value and v dies out.

Dᵤ diffusion, D_v diffusion: the two diffusion coefficients. Patterns need Du clearly larger than Dv.

resolution: the side length of the square grid, 50 to 400 cells.