Modeling Pattern Formation

Beautiful patterns appear everywhere in nature: on the wings of butterflies, on the feathers of birds, on the abdomen of spiders, and on the skin of salamanders, to give just a few examples.

Left: A mormon fritillary butterfly (North America). Right: An Asian koel (a member of the cuckoo family).
A golden orb weaver spider (southeast Asia).
A fire salamander (Europe).

These patterns do not just appear out of nowhere, though. They are formed as the organism grows from an embryo or larva into an adult form. Neither are these patterns completely genetically determined. They are the result of the dynamic developmental process of the organism.

So how does this happen? How do these patterns form, and what kind of mechanism might be behind such pattern formation? One way to study this is with mathematical models known as cellular automata.

Cellular automata

In its simplest form, a cellular autamoton is a linear arrangement of identical “cells” (squares), each of which can be one of two colors, say either black or white. The image below shows a linear arrangement of ten cells, with each cell colored black or white randomly according to a coin toss (heads=black, tails=white).

Now, at regular time steps all cells repeatedly decide whether to stay the same color or change color. They don’t make this decision arbitrarily though. A cell’s color at the next time step actually depends on the current colors of three particular cells: the cell itself and its two closest neighbors, one to the left and one to the right.

Since each of these three cells is either black or white, there are 2x2x2=23=8 possible three-cell color configurations. A given update rule specifies for each of these possible configurations what the color of the center cell will be at the next time step. Here is an example of such an update rule, showing the possible color configurations (numbered from 1 to 8) with the new cell color directly below them:

Consider, for example, the second cell from the left in the 10-cell arrangement shown above. It currently finds itself in a white-black-white configuration (the cell itself is black while its two neighbors are white). This matches rule number 3 in the given update rule, which specifies that the cell will be white at the next time step. Similarly, the third cell from the left currently finds itself in a black-white-white configuration (rule number 5), and will thus be black at the next time step. Applying this update rule to all ten cells simultaneously results in the following overall color arrangement:

Note that to be able to apply the update rule to the first (leftmost) and last (rightmost) cells in the arrangement, the left neighbor of the first cell is taken to be the last cell, and the right neighbor of the last cell is taken to be the first cell. In other words, the cell arrangement is actually considered to be circular, with the left and right ends meeting. Applying the update rule once again results in the arrangement shown below.

This way, the update rule is repeatedly applied, giving rise to a dynamic development of the color configuration in the cellular automaton as a whole. The next figure shows a larger example with 100 cells (horizontally) for 100 time steps (vertically). In each image, at the first time step (top row) the colors are assigned randomly.

As this image shows, this simple (and purely local) update rule already produces intricate patterns at a global (system-wide) scale. If the update rule is changed (i.e., if the new cell colors for the eight possible color configurations are changed), the resulting global pattern also changes. However, it is not always possible to predict in advance what the resulting global pattern will be from just considering the local update rule. Often the only way to find out is to explicitly apply the update rule for a certain number of time steps.

Interestingly, the pattern that results from the update rule shown above already starts to resemble patterns that occur in natural systems, for example on sea shells. The image below shows the shell of a Conus textile, a poisonous sea slug. In such a shell, the pigment cells are located in a narrow band along the shell’s lip. Each of these cells secretes pigments according to the pigmentation activity of its immediate neighbors. This, then, gives rise to the global pattern on the shell as it grows larger and larger.

A Conus textile shell from Tamil Nadu, India.

So, not only the pattern itself, but also the actual process that gives rise to it can be accurately modeled with cellular automata. Stephen Wolfram was one of the pioneers in the study of this simplest form of cellular automata, known as elementary cellular automata. His work inspired many other researchers to start using cellular automata as modeling tools in physics and bioliogy.

Global synchronization

Another type of pattern that is often observed in natural systems is global synchronization. Examples are synchronous flashing in firefly colonies, and synchronized oscillations in the brain (used for sensory input classification).

The question here is how such globally synchronized behavior is achieved, given that there is no central control in the system. There is no single fly or neuron, or even a small group of flies or neurons, that dictates the behavior of every other fly or neuron in the system. Fireflies start flashing more or less randomly and independently, but over time they come to flash in synchrony.

This type of dynamical pattern formation can also be studied with cellular automata. Imagine a similar update rule as described above, but where a cell’s next color is determined by its own current color and that of its three closest neighbors on both sides. In other words, there is a seven-cell color configuration that determines a cell’s next color. This means there are now 27=128 possible color configurations.

The number of possible update rules is now also much larger, as each of these 128 color configurations can have either white or black for the center cell’s next color. But it is possible to find a particular update rule that results in globally synchronized oscillations, just as in fireflies or neural assemblies. An example is shown below, again with 100 cells (horizontally) for 100 time steps (vertically), and for each image a random configuration of black and white cells at the first time step (top row).

Note that for this cellular automaton, locally synchronized oscillations already appear early on (near the top of the image). However, often these locally synchronized regions are out of phase with each other. For example, at a given time step one region might be all-white, while another region is all-black (or vice versa). So, in order to achieve globally synchronized oscillations, these local phase differences need to be resolved.

It turns out that this particular cellular automaton uses a second pattern, in this case a zig-zag pattern, to resolve these conflicts, and eventually get all cells to oscillate in synchrony and in the same phase. Such locally synchronized behavior and phase-difference resolution has actually been observed in stomatal dynamics on plant leaves, which results in optimizing CO2 uptake while minimizing water loss.

Globally synchronizing cellular automata were originally discovered and analyzed by the evolving cellular automata group (of which I was a member for several years) at the Santa Fe Institute.

Spontaneous spirals

As a final example, consider spiral waves observed in some chemical and biological systems. For instance, in chemistry the well-known Belousov-Zhabotinsky (BZ) reaction, when carried out in a petri dish, generates such spiral waves. And in biology the slime mold Dictyostelium discoideum, an organism that normally lives as individual (single-celled) amoebae, produces similar patterns when aggregating into a single (multi-cellular) body that produces spores which develop into individual amoebae again. As with the previous examples, here too there is no central control in the system, only local (chemical) interactions. Yet intricate patterns emerge spontaneously at a global (system-wide) scale.

These beautiful patterns, and their development, can also be modeled with cellular automata. In this case a two-dimensional (2D) cellular automaton is needed rather than a linear (1D) arrangement, and a whole range of colors rather than just black and white. This once more increases the total number of possible update rules. But given the right update rule, spirals can form spontaneously, as shown in the sequence of images below (using a 100×100 2D grid of cells).

As before, the cellular automaton is started with a random color configuration at the first time step (t=0), where the colors range along a gradient from dark red to bright red. After some number of time steps (t=300), the cells have largely synchronized in terms of their color, but some small spirals have started to form. Over time (t=1000 and t=2000), these spirals grow and start interacting with each other, until finally (t=3500 and t=6000) one of them takes over and eventually occupies the entire grid.

The movie below shows such spiral wave formation in real time. This particular cellular automaton is based on a mathematical model originally developed by several colleagues.

In short, cellular automata are simple yet powerful mathematical models that generate patterns closely resembling those found in natural systems. Moreover, these models reflect some of the main properties of many natural systems, in particular their lack of a central control, and only local interactions giving rise to the global patterns. Cellular automata thus provide an excellent tool for studying such natural and spontaneous pattern formation, elucidating both the beauty and the science of nature.


All photographs, images, and movie © Wim Hordijk

This article is part of the Beauty and Science of Nature series.