Two chemicals. One feedback loop.
Simple rules, impossible-looking worlds.
The Gray–Scott model describes two concentrations, U and V. U is fed into the system; V consumes U to make more V, then V is removed. Diffusion spreads both chemicals through space. That small competition between reaction and transport produces spots, stripes, splitting cells, turbulence, and traveling structures.
∂u/∂t = Dᵤ∇²u − uv² + F(1 − u)
∂v/∂t = Dᵥ∇²v + uv² − (F + k)v
This implementation stores U and V in 32-bit GPU textures and advances the equations with explicit Euler integration. The common weighted 9-point lattice stencil supplies a nearly isotropic discrete Laplacian; its displayed D values are stencil multipliers, not the paper’s continuum coefficients in physical units. If floating-point WebGL 2 rendering is unavailable, the same model runs in a lower-resolution Canvas 2D fallback.
Paper note. The supplied 2026 paper studies a fractional-diffusion extension and gives one classical numerical case: F = 0.04, k = 0.0636, Dᵤ:Dᵥ = 2:1, a 256² grid, forward Euler, and no-flux boundaries. It prints the exact uniform equilibrium U = 1, V = 0 as its initial state, which cannot form a pattern without a perturbation; the figures visibly use an undocumented center seed. The matching preset here adds that seed explicitly. The fractional operator is noted but not implemented so this laboratory can prioritize the reproducible core model.
Preset provenance
Pearson’s original study used periodic boundaries, a 256² mesh, Δt = 1, a 20² center patch at U = 1/2 and V = 1/4, and 1% symmetry-breaking noise. Presets carrying Greek letters come from his parameter map. “Coral,” “Worms,” “Bubbles,” and “Mitosis” are later community names. The localized π preset follows Munafo’s moving-spot regime and is especially sensitive to its seed.
Keyboard
SpacePlay / pause
RReset preset
CClear field
HShow / hide lab
PDownload PNG
[ ]Resize brush
Performance and future work
WebGL 2 ping-pong textures keep 256² and 512² fields responsive on modern hardware; 1024² is intentionally available for stronger GPUs. A future WebGPU version could batch more timesteps per command submission and make FFT-based fractional diffusion practical.