Skip to main content
BVDART Logo
← All guidesGenerative systems

Reaction–diffusion

Reaction–diffusion combines local reactions with the spread of quantities through space. The Gray–Scott model can form spots, stripes and moving boundaries from two interacting fields.

Explore developed chemical patterns, then replay their formation

Chemical B · step 1800Dark = 0 · light ≥ 0.45 · periodic edges
Initial B seed before evolution

This pattern starts from these deposits of B. The opening image is the actual simulation after 1,800 updates; reset to replay its development.

The next update at the crosshair
A0.451B0.296
ΔB = Dᵦ∇²B + AB² − (f + k)B
Diffusion
-0.00492
Reaction
+0.03938
Removal
−0.03443
ΔB
0.00003

A + 2B → 3B. A diffuses twice as fast as B. Feed replenishes A; feed and kill remove B.

New rates apply on the next step. Explicit Euler: Δt = 1; diffusion stencil 0.2 / 0.05; concentrations clipped to [0, 1].

Mean B: 0.2055

Try this Compare Labyrinth and Islands: a small rate change separates the network into islands. Reset chemicals to see the starting deposits, or add B at the probe and advance the same simulation.

Evolve the displayed chemicals for 600 real steps while feed changes gradually. Replay continues the simulation. Use any control to take over.

What to try
  1. Compare Labyrinth, Islands and Ribbons; each opens after 1,800 real simulation steps.
  2. Reset chemicals to inspect the initial deposits, then step forward or add B at the probe.
Open in the Lab ↗

What to look for: The pattern emerges from repeated diffusion, reaction and removal. The inspector accounts for one cell’s next update. B is displayed on a 0–0.45 brightness scale so the actual concentration structure remains visible.

How it works

The Lab evolves concentrations A and B. Diffusion spreads each field through a neighborhood; the reaction term A × B² consumes A and produces B. Feed replenishes A and kill removes B. Their balance matters more than either number in isolation.

The initial seed patches, diffusion rates and iteration count also affect the image. A fixed simulation grid controls the numerical workload; the resulting field is resampled to the document. More steps means more simulated evolution, not simply more noise octaves.

Use it in the Lab

Use Reaction–diffusion as a generative starting layer and then shape the contrast or palette. Save the full settings and seed when you discover a useful regime.

Limits & distinctions

This is a bounded numerical illustration with a fixed update scheme. It is not calibrated to a physical chemical system, and extreme parameter choices can produce saturated or featureless fields.

Sources & references

Guide updated