Reading time: about 3 minutes
In the last paper published before his death, Alan Turing proposed a reaction-diffusion model as the basis for the development of many biological features, including the patterns of colour seen on animal coats and the arrangement of tentacles on hydras. The theory has become a basic model in biology, and has been used to study how blood clots, how tumours grow, how epidemics spread, and many other phenomena. This page lets you explore the same kind of system Turing examined in his paper. See if you can create some interesting “coat patterns” of your own!
A reaction-diffusion system is a mathematical model that describes how the concentration of chemical substances changes in a space over time. It considers the interplay between two basic processes: local reactions that change one substance into another, and the diffusion of those substances over a surface. Imagine two people standing in a room, one spraying red paint and one spraying blue paint. There will be a high concentration of blue paint at the blue can’s nozzle, and a high concentration of red paint at the red can’s nozzle. But the concentrations won’t stay that way. Over time, the paint droplets will diffuse around the room, and where red and blue bump together, they will react to create varying hues of purple paint depending on how much of each colour went into the mix.
You can see a reaction-diffusion system in action by pressing the Solve button above. You can think of the brightness of a given point as representing how much of a substance is present. At the start, everything is in a random state, but as soon as you set the process running, local reactions will start to increase or decrease the amount of substance at any given point. The product of those local reactions will slowly diffuse outward, interacting with the products of all of the other local reactions diffusing outward from their starting points. The end result is a nice pattern.
The number of iterations lets you control the number of time steps that the simulation runs for. The higher the value, the longer it runs. Most systems will reach a nearly stable state by about 1000 iterations, so they don’t change much after that.
Many animals develop their coat patterns in stages. Typically, a secondary pattern will emerge as the animal transitions to adulthood. You can experiment with this concept by unchecking the randomize before each solve option. Now the pattern will only be randomized when you request it by pressing Randomize. Do this once to get started, then run a simulation by pressing Solve. That’s your baby pattern. Awww. So cute! (Tip: Reducing the number of iterations to 100–400 gives you more control over when the transition starts.) Now it’s time for the adult pattern to emerge: choose new constants and re-run the simulation without randomizing. They grow up so fast, don’t they?
If you experiment with choosing your own constant values, you may find some combinations that lead to images that seem to loop until the colours break into steps rather than smooth gradients. You reached the precision limits of the computer’s arithmetic before the system reached a stable state. Just try again with different values.
The model used by this page assumes that the skin cells are arranged on the surface of a torus. That means that the texture images will tile seamlessly if placed next to each other, so they work well as textures in graphics applications and 3D models. In fact, the image you see above is actually four copies of a single smaller image arranged in a 2×2 grid!