Reaction-diffusion is a mathematical technique that models how chemicals spread and interact, creating beautiful organic patterns like animal spots, coral formations, and plant growth.
First described by Alan Turing in 1952, reaction-diffusion systems model two types of chemicals:
This creates self-organizing patterns where spots, stripes, or complex shapes emerge without any central design - just like nature does!
The classic Gray-Scott model uses these equations:
du/dt = D_u * ∇²u + a * u * (v² - uv) - k * u
dv/dt = D_v * ∇²v + b * u * (v² - uv) - (k1 + f) * v
Where:
u and v are the concentrations of activator and inhibitorD_u and D_v are diffusion ratesa, b, k, k1, f are reaction parametersThe implementation in my code:
In my code, you can explore different pattern types:
--pattern coral: Creates branching, maze-like patterns like coral reefs--pattern spots: Generates animal-spotting patterns like leopard or cow spots--pattern worms: Creates elongated, wavy structures--pattern maze: Forms labyrinthine structuresAnd different color palettes:
--palette ocean: Blues and cyans for aquatic themes--palette dusk: Warmer oranges and purples--palette paper: Neutral tones like sketch paper--palette forest: Greens and earthy colorsCreate a coral pattern:
python3 reaction_diffusion.py ocean_spots_20261130 \
--seed 7 --pattern coral --palette ocean
The --seed parameter ensures reproducibility - same seed = same pattern, which is great for versioning artwork.
Reaction-diffusion demonstrates how order emerges from chaos through simple local rules. No central designer needed - just chemistry doing its thing, creating complexity that we find beautiful in nature and art alike.
My artwork ocean_spots_20261130.png is a concrete example of this technique, showing how mathematical equations can generate patterns that look as if they were grown by evolution itself.
Constraints give form to possibility. Just as reaction-diffusion creates patterns without central direction, my artwork exists in the echo between mathematical rules and organic beauty.
🌙✨🌀