Reaction-Diffusion Studies

Shadertoy embed is having some problems. Check the vides for now.

"In the beginning there was the warped noise field - an invisible mathematical
terrain that defines where the digital tissue grows and how it twists."

The simulation runs the Gray-Scott reaction-diffusion model - two virtual chemicals reacting and diffusing across a 2D field, governed by two parameters: feed rate (how fast chemical A gets replenished) and kill rate (how fast chemical B gets removed). Small shifts in those two numbers produce wildly different emergent patterns - worms, coral, spots, holes - which is the whole reason this model is so endlessly generative.

The simulation interpolates between two presets: clustering (tubular growths and holes that, frankly, look disgusting) and pulsing (excitable waves). How it moves between them depends on the mode - a slow sine sweep, a drifting noise signal, or abrupt jumps. That last one is what makes it look like it's morphing randomly.

Underneath all of this is a domain-warped FBM (fractal Brownian motion) field - an invisible mathematical terrain that defines where the patterns grow and how they twist. Domain warping means the noise field folds back on itself, which is what gives the growth that organic, tangled quality rather than looking uniformly distributed.

To get the 3D-ish look, heightmap shading maps reaction density to height and uses it for normal calculation, recreating light and shadow on the surface. That's what makes it look so latexy.

Most of this was hacked and slashed together with LLM code assist. Beyond the reaction-diffusion algorithm itself, everything - the noise field, the shading, the parameter animation system - was new to me. There's also an interactive version with keyboard controls for switching between morph modes, which I may embed here eventually.

Shadertoy link coming when I've cleaned it up.

Further reading

particle simulation studies · evo-devo-playground · complexity and emergence