Reaction-Diffusion

Turing patterns, grown live

kill →↑ feed

Paint on the dish to add chemical B. Shift or right-click to wipe it away.

Step 0. The address of the page keeps the pattern, to share it.

Two chemicals and a recipe

In 1952, two years before his death, Alan Turing published The Chemical Basis of Morphogenesis. He asked how a round, uniform ball of cells could ever become a striped or spotted animal, and answered with chemistry: two substances that react with each other and spread at different speeds will, all by themselves, break a smooth mixture into a regular pattern. The fast one smooths things out, the slow one builds them up, and their tug of war leaves spots or stripes at a size set by the rates alone.

This page runs the Gray-Scott model, a simple version of that idea from 1984. The dish holds two chemicals, A and B. A is poured in everywhere at the feed rate. Where they meet, two B turn one A into a third B (A + 2B → 3B), and B is drained away at the kill rate. A spreads twice as fast as B. Each cell of the 512 × 512 grid applies these rules to itself and its eight neighbors, many times a second.

A′ = A + DA ∇²A − AB² + f (1 − A)
B′ = B + DB ∇²B + AB² − (k + f) B

In 1993 John Pearson mapped what the model does for every feed and kill, and named the patterns he found with Greek letters. Most of the map is dull: B dies out, or fills everything. The life is in a thin, curved band, where small steps of the sliders turn spots into stripes into coral. Tick Parameter map to see the whole band at once, with feed rising from bottom to top and kill growing from left to right.

Turing could not prove that animals really work this way, and for decades no one could. Since then, reaction-diffusion has been found at work in the stripes of zebrafish, the spacing of hair follicles and feathers, the ridges of the palate and the digits of the hand.