Loading the engineShared by all simulations, so the next one opens instantly.
The physics

In 1951 Boris Belousov found that a solution of citric acid, bromate and a cerium catalyst turns from colorless to yellow and back again, cycle after cycle. Journals turned the report down, since a chemical reaction was expected to run steadily toward equilibrium, and only a short abstract appeared in 1959. Anatol Zhabotinsky continued the work in the 1960s, and in a thin unstirred layer the reaction turned out to carry waves: concentric rings (Zaikin and Zhabotinsky, 1970) and rotating spirals (Arthur Winfree, 1972). Such a layer is an excitable medium, like heart muscle: a resting region fires when its neighbors fire, and then needs time to recover before it can fire again. James Greenberg and Stuart Hastings reduced this to a cellular automaton in 1978, and a version of their automaton runs here.

What you see

A 200 by 200 grid whose edges wrap around, so the grid is a torus. Excited cells are blue to near white, refractory cells fade from pale cyan through indigo to black, and resting cells are black. The simulation advances one step per frame. A wave front moves one cell per step, 60 cells per second at 60 frames per second, and a spiral turns once per 61 steps, about once per second.

Rule

Each cell is in one of 61 states: resting (0), excited (1 to 3) or refractory (4 to 60). All cells update at once:

  • a resting cell becomes excited (state 1) when at least θ of its eight neighbors are excited,
  • every other cell advances by one state, and state 60 returns to rest.

A cell therefore stays excited for 3 steps and refractory for 57, a full cycle of 61 steps. Behind a front that runs along a grid row lies a band of excited cells, so a resting cell just ahead of it has exactly 3 excited neighbors. For θ≤3 the front advances one cell per step. For θ≥4 it stalls, and every wave dies out, which is why the threshold stops at 3.

A wave with a free end curls around that end, and the end becomes the core of a spiral. Here a spiral turns as fast as the cells recover: every cell it sweeps fires once per 61 steps, so successive arms are 61 cells apart along the grid axes.

Presets

Spiral pair: θ=2, also the default. The run starts from a straight wave on the middle row of the right half of the grid, moving up, with its refractory tail below it. On the torus this wave has two free ends, and they curl into two spirals that turn in opposite directions. Both cores keep turning (checked over a minute), and once the spirals fill the grid every cell fires exactly every 61 steps.

Scattered spirals: θ=1, so a single excited neighbor is enough. Nine shorter broken waves start at random positions and directions, one in each ninth of the grid. Their 18 ends become spiral cores; collisions remove a few in the first seconds, and 14 cores remain after 20 seconds and keep turning.

Plane wave: θ=3, from the same start as the spiral pair. At this threshold the free ends do not curl up. The front first shortens, after about 3 seconds both free ends are gone, and from about 5 seconds on a single straight wave spans the full width and circles the torus, so every cell fires once per 200 steps, one grid length.

Parameters

Excitation threshold: the number of excited neighbors, 1 to 3, a resting cell needs before it fires. Changes act at once on the running grid.

Resolution: the side length of the square grid, 50 to 400 cells. It takes effect on Reset, and the starting waves scale with the grid.