1 video

Reaction–diffusion

Chemicals that feed, react and spread on a grid, and the patterns they grow by themselves.

Two chemicals share a surface. They react with each other, and they spread out, one faster than the other. Nothing in the rules mentions stripes or spots, yet from a single drop the mixture grows mazes, coral, stripes or spots by itself. This series shows how that happens.

How it works

Diffusion spreads things out. On its own, a chemical flows from where there is more of it to where there is less, until it is even everywhere. On a grid, each cell moves toward the average of its neighbours. Diffusion alone always smooths a pattern away.

Reaction can make a chemical grow. In the Gray–Scott model, chemical A is fed in steadily, and wherever one A meets two Bs, the A turns into B. So B makes more of itself, using up A. Meanwhile B dies off at a steady rate.

Spreading at different speeds makes patterns. In the usual setting A spreads twice as fast as B. Where B grows, it uses up the A around it, and A can't flow back in fast enough to feed a wide patch. So B can grow in thin lines and small spots, but not in a solid sheet. Alan Turing first suggested in 1952 that patterns on animal skins could form from reacting and diffusing chemicals, which is why these are often called Turing patterns.

Two numbers choose the pattern. In Gray–Scott, the feed rate F and the kill rate k decide what grows. Small changes in them can turn stripes into spots, or make the pattern die out altogether.

The equations, with Δ for the spreading:

A' = ΔA − AB² + F·(1 − A) B' = ½·ΔB + AB² − (F + k)·B

Go further