This is the same Gray-Scott reaction-diffusion system as the 3D version, but solved directly on a plain 2D canvas: every animation frame runs real numerical steps of the coupled PDE over a grid of cells on the CPU, with no WebGL shader involved. Two virtual chemicals, U and V, diffuse and react, and from that simple local rule spots, stripes, mazes and self-replicating blobs emerge on their own.
∂U/∂t = Du·∇²U − U·V² + f·(1 − U) and
∂V/∂t = Dv·∇²V + U·V² − (f + k)·V — U and V are the
chemical concentrations, ∇² is the discrete Laplacian, Du = 1.0 and
Dv = 0.5 are the diffusion rates, f is the feed rate and k is the
kill rate.
Because this version steps the real PDE in plain JavaScript instead of a GPU shader, you can watch each generation's math directly in the source — the exact same nine-point stencil used by the 3D shader version, just run one cell at a time.
The same Gray-Scott reaction-diffusion chemistry as the 3D shader version, but solved with a real, inspectable numeric loop on a plain 2D canvas: two chemicals U and V diffuse across a 128×128 grid and react, self-organising into spots, stripes, mazes and self-replicating blobs purely from local rules.
Click or drag on the canvas to seed chemical V at the cursor. Drag the feed rate (f) and kill rate (k) sliders to switch pattern families, or jump straight to a preset. The Speed slider sets PDE steps per frame; Pause freezes the grid so you can inspect a frozen pattern.
Unlike the GPU shader version, this simulation updates every one of its 16,384 grid cells with an explicit JavaScript loop each step — genuinely computing the same nine-point discrete Laplacian a fragment shader would, just on the CPU where you can read the exact arithmetic in the page source.