Gray–Scott patterns

Explore reaction–diffusion patterns with reproducible seeds, live feed and loss rates, and a periodic brush.

About this tool

Explore patterns

Run a preset and watch patches grow, split, join or fade. Feed F replenishes substrate u; loss k removes activator v. Change F, k or diffusion while running to observe their effect. Preset names describe possible appearances, not guaranteed final patterns. New presets, initial patterns or random seeds require a restart. The same seed and settings reproduce the same initial field and model steps.

Model

∂u/∂t = Dᵤ∇²u − uv² + F(1 − u)
∂v/∂t = Dᵥ∇²v + uv² − (F + k)v

This dimensionless model uses a 128 × 128 periodic grid with Δx = Δy = 1. The uniform state u = 1, v = 0 stays unchanged until perturbed. Patches set u ≈ 0.5 and v ≈ 0.25 with seeded noise. The field is not mass-conserving: d⟨u + v⟩/dt = F(1 − ⟨u⟩) − (F + k)⟨v⟩. The displayed spread is the spatial standard deviation of v, not an automatic classification.

Time and accuracy

A five-point Laplacian and explicit Euler advance the fields. Each step uses Δt ≤ min(maximum Δt, 0.9 / (4Dᵤ/Δx² + max(v)² + F), 0.9 / (4Dᵥ/Δx² + F + k)). This sufficient bound keeps nonnegative concentrations nonnegative; it does not guarantee accuracy. No concentration clipping or renormalization is applied. Reduce maximum Δt to check time-discretization effects. Grid-dependent patterns are demonstrations, not a continuum convergence claim.

Playback accumulates model time independently of display frame rate. Work is bounded per frame; demanding settings slow playback rather than increasing Δt. Hidden tools and tabs suspend playback without catching up. With reduced motion enabled, Run starts paused. One step advances one numerical step.

Painting and colour

Enable Paint seeds to draw with a mouse or touch. Leave it off to scroll on a phone. The coordinate controls provide a keyboard alternative: x and y are cell indices 0–127, with (0, 0) at the top left. The brush wraps across edges and replaces cells with u = 0.5, v = 0.25 without advancing time. Manual painting changes the experiment; a restart restores its seeded initial state. Fixed colour scales allow comparisons over time; activator colours saturate above 0.5 while the numerical maximum remains visible in Numerical details.

Reference

J. E. Pearson, Complex Patterns in a Simple System (1993). This tool uses the model equations, not the paper’s grid or dimensional scaling. Finite-amplitude reaction–diffusion patterns are not all Turing instabilities.