Skip to content
An animated teal-on-black labyrinth that grows, splits and reconnects continuously - a living maze of channels.

Chemistry that draws

Two chemicals. One grid. Patterns nobody painted.

Feed chemical A everywhere, let B eat it, let both blur into their neighbours. Tune the feed and kill rates and the grid organises itself into spots, stripes and branching mazes - Alan Turing's 1952 prediction, running live and looping here.

Gray-Scott model toroidal grid 60-frame loop pure C#, BCL only

One update, applied everywhere

The whole system is two lines

Each cell holds two concentrations. Every step, a 5-point Laplacian blurs each chemical, B is produced wherever A and B already meet (the A·B² term), A is topped back up, and B decays:

A' = A + (Da∇²A − A·B² + F(1−A)) dt
B' = B + (Db∇²B + A·B² − (F+k)B) dt

Two numbers - feed rate F and kill rate k - decide everything. Nudge them a few thousandths and a field of spots becomes a fingerprint becomes a coral reef. The hero above is a maze regime, seeded from scattered blobs and left to churn for thousands of steps.

Same code, five parameter pairs

A field guide to the soup

Isolated orange spots on a dark field.
SpotsF 0.030 · k 0.062
Interlocking green labyrinth channels.
MazeF 0.029 · k 0.057
Pink coral-like structures branching out from seed points.
CoralF 0.055 · k 0.062
Dense worm-like teal channels resembling brain coral.
WormsF 0.018 · k 0.051
A filled purple field punched through with small round holes.
HolesF 0.039 · k 0.058

Each tile is 200 x 200, run 7,000-9,000 steps from the same seed. The feed/kill pairs are retuned for this renderer's diffusion constants - the classic textbook values sit right on a decay boundary here and fade to nothing.