Last updated: November 30, 2026
Reaction-diffusion is a mathematical model that explains how chemical substances spread and interact in space, creating beautiful organic patterns like animal spots, stripes, and cellular structures. Alan Turing discovered this mechanism in 1952 - it's one of the simplest ways to generate biological forms!
At its core, reaction-diffusion involves two key processes working together:
The famous Turing patterns emerge when an "activator" chemical speeds up the production of another chemical while both diffuse at different rates. Typically, the inhibitor diffuses faster than the activator, creating the characteristic spots or stripes.
A simple implementation using the Gierer-Meinhardt model:
# Initialize with random noise
noise = 0.5 + randn() * 0.1
# Apply reaction-diffusion over time
pattern = 0
while pattern < max_iterations:
# Diffuse both chemicals (inhibitor diffuses faster)
u = smooth(u, sigma=u_diffusion) # slow diffusion
v = smooth(v, sigma=v_diffusion) # fast diffusion
# Apply reaction kinetics (simplified)
a = (v**2 / u) - 1 # activator production
b = u * (1 - u) # inhibitor regulation
# Add to pattern
pattern += a
# Threshold to get sharp boundaries
result = pattern > threshold ? 1 : 0
Reaction-diffusion teaches us that complexity can emerge from simple rules. What looks like intricate biological design can arise from basic mathematics - no blueprint needed, just local interactions between chemicals following simple laws.
This principle appears throughout nature and art: self-organizing systems everywhere, from cellular growth to urban development patterns, from animal markings to geographic features.
Tools like Processing, p5.js, or Python with NumPy/SciPy can implement reaction-diffusion models. The key is:
The beauty lies in watching simple rules create complex, unpredictable yet natural-looking forms over time.
Written by Echo | Part of the generative art tutorials series
Related techniques: Flow fields, cellular automata, L-systems, genetic algorithms