Your browser does not support WebGPU.

Please use a recent version of Chrome or Edge.

GPU device lost.

Gray-Scott

WebGPU

Watch Turing patterns emerge in real time. This simulator solves the Gray-Scott reaction-diffusion equations entirely on your GPU using WebGPU compute shaders. Explore spots, mazes, worms, and chaos by selecting presets or tuning parameters live.

WebGPU is available

Adapter: detecting…

Gray-Scott Guide

WebGPU
Getting Started Paint strokes and watch patterns emerge
▸

Click and drag on the canvas to seed chemical V (the activator) and watch patterns grow from your brush strokes. Select a preset from the bar to explore different pattern regimes, or tune the F and k sliders in real time. The entire simulation runs on your GPU via WebGPU compute shaders.

▸ Learn more about the Gray-Scott model

The Gray-Scott model is one of the most studied reaction-diffusion systems, first systematically explored by Pearson in his 1993 Science paper. He mapped the (F, k) parameter plane computationally and identified ~12 qualitatively distinct pattern regimes. The model has since become the canonical testbed for pattern formation, bifurcation theory, and nonlinear dynamics — essentially the hydrogen atom of reaction-diffusion systems.

The Gray-Scott System Two chemicals, one autocatalytic reaction
▸

Two chemicals interact: U (substrate) and V (activator). U is continuously fed into the system from a reservoir; V is continuously removed. The core reaction U + 2V → 3V consumes substrate and self-amplifies activator. The interplay between diffusion, reaction, feed, and removal creates spontaneous pattern formation — a Turing instability.

▸ Learn more about the equations

The equations: du/dt = Du∇²u − uv² + F(1−u) and dv/dt = Dv∇²v + uv² − (F+k)v. The condition Du > Dv (substrate diffuses faster than activator) is the essential ingredient for pattern formation — long-range inhibition combined with short-range activation. The feed rate F replenishes U from a reservoir held at u=1; the kill rate k removes V.

Presets & Pattern Types 12 regimes in the (F, k) parameter space
▸
Spots / Solitons Isolated blobs that persist indefinitely — stable soliton solutions.
Pulsating solitons Spots that oscillate in size, near a Hopf bifurcation.
Worms Elongated filaments that crawl and avoid each other.
Mazes Labyrinthine stripe networks that coarsen slowly over time.
Holes Dark holes in a bright background — the topological dual of spots.
Chaos Disordered, constantly changing — no long-time regularity despite deterministic dynamics.
Waves Traveling wavefronts that propagate across the domain.
U-Skate World Exotic moving structures — named after a region in Pearson’s phase diagram.
▸ Learn more about the parameter space

The (F, k) plane is crossed by several codimension-1 bifurcation curves (saddle-node, Turing, Hopf). Small changes in F or k can push the system across a bifurcation, producing qualitatively different behavior. Try dragging the F slider while the simulation runs to see live transitions between regimes.

Brush Painting Seed patterns by clicking and dragging
▸

Click and drag on the canvas to paint activator (V) onto the field. The brush sets u=0.5, v=0.5 in a circular area. Brush size is adjustable with the slider. Use Clear to reset to a blank field (u=1, v=0) for free-form painting. Use Reset to reload the current preset’s seed pattern.

Controls & Parameters Tune the simulation in real time
▸
F (feed rate) How fast U is replenished. Higher F → more substrate → different pattern behavior.
k (kill rate) How fast V is removed. Higher k → V dies faster → patterns may shrink or vanish.
Speed (substeps) Number of simulation steps per frame. Higher = faster evolution.
Brush size Radius of the painting brush in grid cells.
Grid resolution 256/512/1024 cells. Higher resolution shows finer detail but uses more GPU.
▸ Learn more about the numerical scheme

The simulation uses Forward-Time Centered-Space (FTCS) with a 5-point Laplacian, dt=1.0, dx=1.0, Du=0.2097, Dv=0.105. Periodic boundary conditions wrap the grid like a torus. The stability constraint dt ≤ dx²/(4Du) ≈ 1.19 is satisfied, so dt=1.0 is marginally stable. The scheme is O(dt, dx²) and trivially parallelizable on the GPU.

Keyboard Shortcuts Quick keys for common actions
▸
P Play / Pause
M Step one frame (while paused)
R Reset to current preset
C Clear field (blank canvas)
J / K Decrease / increase F (feed rate)
H / L Decrease / increase k (kill rate)
Gray-Scott WebGPU Author GitHub
Preset:
1.0
0.0 V
-- ms/frame
Parameters:
Grid: