Back to Overview

Reaction Diffusion Simulation

Chemical simulation using the Gray-Scott model

This is a simulation of two chemicals reacting. Chemical A is being added at a constant rate (feed rate) and reacts with two particles of chemical B to form more of B. Chemical B is being removed from the system at a constant kill rate. For most parameter combinations the system is stable and converges to a solution quickly, with either chemical B disappearing completely, or reacting fast that it consumes all of the incoming chemical A. But for certains diffusion speeds of A and B, interesting patterns start to emerge, with organic structures forming. Here's a great explanation and the according Wikipedia article.

Here are a few screenshots of interesting results I got.

Gray-Scott reaction diffusion bubble like structures Gray-Scott reaction diffusion road like structures
Gray-Scott reaction diffusion Spiral like structure Gray-Scott reaction diffusion worm like structure