Paint chemicals on a live Gray-Scott grid, explore the (F, k) parameter map and verify the maths with built-in checks.
The Gray-Scott model describes two chemicals: a feed chemical u that is supplied at rate F, and an activator v that consumes u autocatalytically and is removed at rate F + k:
∂u/∂t = Dₐ ∇²u − u v² + F (1 − u)∂v/∂t = Dᵥ ∇²v + u v² − (F + k) v
Here Dₐ=0.2 and Dᵥ=0.1 (grid units), the explicit Euler step is 1, and the Laplacian is the 5-point stencil. Because u diffuses faster than v a Turing-type instability can arise: the uniform state is unstable to a band of wavelengths and spots, stripes, coral or worms grow. Which pattern appears depends only on (F, k) - the parameter map in the lower right shows where the presets sit.
u v = F + k and F u (1 − u) = (F + k)², so u = (1 ± √(1 − 4 (F+k)²/F)) / 2. They exist only when F ≥ 4 (F+k)² - the green saddle-node curve k = √F/2 − F.k − v² and determinant (F+k)(v² − F); the trace vanishes where (F + k)⁴ = k F², the red Hopf curve (below it the well-mixed state oscillates).Checks. "Run checks" builds a small test grid and verifies (1) that the analytic fixed point is preserved by the discrete scheme, (2) that diffusion alone conserves mass, (3) that a cosine mode decays exactly as (1 − Dₐ(2 − 2cos(2πm/N)))ⁿ, and (4) the Hopf-curve root.
Simplifications. Explicit Euler with a fixed step, no noise term, a 320x200 grid and dimensionless units - the pattern wavelength in cells is not a physical length. The Turing/Hopf boundaries drawn are the homogeneous-state analysis; the full pattern boundaries also depend on the diffusion ratio.