# Turing Patterns

> Watch a Gray–Scott reaction–diffusion simulation make the spots and stripes of animal coats. Drag the kill rate k to change spots into stripes.

In 1952 Alan Turing showed how two chemicals that react and spread at different rates can make patterns such as the spots and stripes of animal coats. This document uses the Gray–Scott model of such a reaction (J. Pearson, Science, 1993): two chemicals with the concentrations $u$ and $v$ on a grid of 64 × 64 cells whose opposite edges are joined. One time step of each cell is $u \leftarrow u + 0.2\Delta u - uv^2 + F(1 - u)$ and $v \leftarrow v + 0.1\Delta v + uv^2 - (F + k)v$, where $\Delta$ is the sum of the four neighbours minus four times the cell. $v$ feeds on $u$; $u$ is fed in at the rate $F$, and $v$ is removed at the rate $F + k$. $u$ spreads twice as fast as $v$, and that difference makes the patterns.

With $F = 0.035$, the kill rate $k$ chooses the pattern: $k \le 0.061$ gives stripes, like a zebra, and $k \ge 0.063$ gives spots, like a cheetah. The slider for $k$ runs from $0.056$ to $0.066$, and a drag changes the pattern while the simulation runs.

The patterns take about 3000 steps to form, so the prelude runs 4000 steps when the document opens, and the simulation starts from a spotted state. The step action then makes 20 steps every 30 ms. The Restart action goes back to the seed, twelve small squares on an even field, to watch the pattern grow. The heat map shows $-v$ with the inferno colors: pale yellow where there is no $v$, dark where there is much.

- [Open the interactive version](https://graph-paper.io/showcase/en/turing-patterns)
- [Learn more on Wikipedia](https://en.wikipedia.org/wiki/Turing_pattern)
