**Jennifer de Kleine**

**December 12, 2000**

Reaction-Diffusion texture synthesis is a procedural method based on the chemical process known as reaction-diffusion.

**Reaction-Diffusion**

chemical mechanism for pattern formation.

first introduced by Alan Turing in 1952.

possible mechanism by which cells of an embryo arrange
themselves into patterns.

two or more chemicals diffuse through an embryo and react
with each other until the chemical concentrations reach some stable state.

cells of different types may then develop in different
positions based on these chemical concentrations, resulting in patterns.

The general form of a two-chemical reaction-diffusion system is:

where represent the two chemicals,

F(a,b) is the reaction between chemicals a and b,

are the diffusion rate constants of a and b,

the Laplacian
is a measure of the
concentration of a at one location with respect to it's concentration nearby.

determines how fast a diffuses.

determines the direction in which a diffuses.

if a has low concentration at some cell then
will be positive and a will diffuse toward this cell.

if a has high concentration at some cell then
will be negative and a will diffuse away from this cell.

Key point: a small amount of variation in the initial concentrations gives an initially unstable system which may then be driven to a stable state in which the chemical concentrations vary across the surface, producing a pattern.

**Previous work**

these systems have been studied by biologists and
mathematicians to see what patterns may be formed.

Andrew Witkin and Micheal Kass considered
reaction-diffusion systems as a model for fingerprints.

Many people have used reaction-diffusion derived algorithms
to generate pretty pictures. You can get nice backgounds from The Wallpaper
Machine by Roy Williams and Bruce Spears.
http://www.cacr.caltech.edu/cgi-bin/wallpaper.pl
Also Andrew Witkin and Micheal Kass won the Prix Ars Electronica 1992 for
their picture 'RD Texture Buttons'. link

Greg Turk looks at generating textures using a cascade of
multiple reaction-diffusion systems.

Greg Turk also introduces a method by which the texture is
generated directly over an arbitrary surface.

**Reaction-Diffusion on a grid**

each square on the grid represents a cell

each cell diffuses to each of its four neighbours

the concentration of each chemical is represented by a 2-D array of
discrete values, one value for each cell on the grid

simulate reaction-diffusion by solving partial differential
equations over the grid

System for generating spots proposed by Turing:

where s is the source density constant.

Small values of s result in a slower reaction relative to diffusion
which gives us larger spots.

Larger values give us smaller spots.

Beta is the parameter which is used to introduce the
small amount of variation into the system making it unstable.

The more beta varies, the more irregular in shape the spots become.

After running this system on a grid, the concentration can be mapped to some colour values to generate texture. I chose a very straightforward simple mapping:

- find minimum and maximum concentration values
- map [min,max] to [0,255]
- set R = G = B = c

Another system which I have implemented is a 5-chemical system proposed by Meindhart for the generation of stripe patterns:

**Multiple reaction-diffusion systems**

More complex patterns can be generated by combining the above two
systems.

First one chemical system is run producing an
initial pattern, which is then refined by simulating another system.

Jonathon Bard suggested that this process may be responsible
for coat patterns of some mammals.

**Cheetah spots**

- run Turing's system with small s to generate large spots.
- fix the concentration of the cells containing low concentration values for b, these are the dark spots.
- run the system again with large s to generate small spots between the large spots.
- because the concentration of a is high at these fixed cells, the small spots will not form too near the larger spots.

**Leopard spots**

- run Turing's system with small s to generate large spots
- fix the concentration of the cells forming the large spots to some low value
- run the system again with large s to generate small spots
- lowering the concentration of a at the fixed cells allows the small spots to form closer to the large spots.

**Lionfish stripes**

- run Meindhart's system with to form wide stripes.
- fix the concentration of the cells with high concentration value for a, these are mapped to the white stripes.
- run the system again with generating thinner stripes between the larger stripes.

**Giraffe reticulation**

- run Turing's system with higher variance in beta to generate slightly irregular spots.
- fix the concentration of the cells with low concentration value for b, these form the dark spots, and set the concentrations of all 5 chemicals at those cells to values mapped to white in Meindhart's system.
- run Meindhart's system to generate stripes between the spots.

**Zebra stripes**

- removing the random variations in beta in Meindhart's system will result in no stripes being formed.
- we can then choose certain cells, initiators, from which the stripes will radiate
- by fixing the concentrations at a cell and setting the concentration of one chemical at that cell to be higher or lower than at the other cells, this cell becomes an initiator
- the stripes below were generated by fixing the cells along the left side of the grid and setting the concentration of a at these cells to be higher than at the other cells

**Greg Turk's results**

Here are some pictures that were produced by simulating these reaction-diffusion systems directly over a mesh.