Stella Nova
Reaction–diffusion
Preset
Loading…

Equations
Patterns and equations from Ready (GollyGang) — github.com/GollyGang/ready
Parameters
Run
Brush
With the mouse, the brush is always on: drag on the grid to paint. Keys [ and ] change the size.
View
Keys
Spaceplay / pause
Rreset
[ ]brush size
← →previous / next preset
About

Each cell of the grid holds an amount of two or more chemicals. Two processes change these amounts. Reaction: at each cell, the chemicals make or use up one another, at rates that depend on how much of each is there. Diffusion: each chemical spreads to the cells next to it, from more to less.

Diffusion alone makes everything smooth and equal. Alan Turing saw in 1952 that diffusion together with reaction can do the opposite: it can make a pattern grow out of an almost uniform start.

His idea needs two chemicals. The activator makes more of itself, and it also makes the inhibitor. The inhibitor stops the activator, and it spreads faster. A small peak of activator then grows where it is, but the inhibitor it makes moves out into a ring around it, and stops other peaks near it. This is local activation and long-range inhibition.

The peaks cannot come too near each other, and there is nothing to stop them further away. So they settle at a spacing that the rates set, not the start. Spots, stripes and labyrinths come from this. Other presets here make waves, spirals and moving spots, from similar rules with different reactions.

The page steps the equations on a grid with forward Euler: each step adds timestep × rate of change to every cell. A timestep that is too large makes the values grow without limit. Each preset gives a safe one.

Patterns and equations from Ready (GollyGang) — github.com/GollyGang/ready