The world’s leading publication for data science, AI, and ML professionals.

Aesthetics Within the Computation World- Part 2: Turing Patterns

This article is part 2 of a series of articles that aim to highlight the aesthetics that can be found in the computational world.

image by the author (you can make your own)
image by the author (you can make your own)

This article is part 2 of a series of articles that aim to highlight the Aesthetics that can be found in the computational world and data universes. It is as Walframe puts it an "abstract voyages in the computational world".

Patterns in nature and the computational world

In this article, we will discuss patterns that can be generated by the Diffusion and Reaction models. These models are relevant to describe various simple natural operations such as diffusive living beings reproducing under conditions of limited food. Even though the models describe very low-level natural phenomena, they reproduce extremely rich and complex patterns.

image by author
image by author

We will not delve very deeply into mathematics in this article if you’re interested in the mathematics of this model you can check this post.

Patterns and aesthetics

We think of design and patterns to be inseparable. Patterns in art were used from ancient Greece, Indus civilization, The Ancient Near East kingdoms to the contemporary art of today. Pattern surrounds us in nature, a unique repeating form for every creature, e.g. fish skin, Zebra, Tiger, Chameleon, and in certain conditions such as the wind patterns formed on the sand in the deserts. Certain art groups such as Art Nouveau and Natural geometry architects wanted to incorporate nature in their work hence they used patterns as the recurring element, while other groups opposed this movement of patterns including the minimalists and conceptual artists. William Moris is a pioneer in introducing the pattern element in wallpaper design back in the 19th century. The famous artist whose work included certain patterns inspired by Byzantine, greek, and Egyptian art is Gustav Klint. Yes, the same artist of the famous painting, The Kiss.

The Kiss (Lovers), oil and gold leaf on canvas, 1907–1908. Österreichische Galerie Belvedere, Vienna, 180 cm × 180 cm (public domain)
The Kiss (Lovers), oil and gold leaf on canvas, 1907–1908. Österreichische Galerie Belvedere, Vienna, 180 cm × 180 cm (public domain)

Yayoi Kusama is the artist famous for her Polka dots designs, the pattern you would notice on the kitchen tablecloth. Artists tried to imitate nature or to be inspired by the patterns found here and there. Here comes the interesting part of our work that by computationally mimicking the phenomena in nature producing these patterns, we will be able to produce designs that are yet to be found. Imagine wearing a dress that has a unique pattern on its own, or your favorite vans shoes with a Turing pattern, since they already used the zebra pattern on one of their sneakers.

Turing pattern on a customized vans generator, (retrieved from Youssef Tekriti, with author's permission)
Turing pattern on a customized vans generator, (retrieved from Youssef Tekriti, with author’s permission)

Let us delve into the seemingly boring mathematics and the phenomena that Turing tried to unravel which might be the root of all these bizarre natural patterns. Surprisingly It will help us discover cooler and unrepeatable patterns.

The Science Behind the Patterns

Pattern formation was always a mystery for scientists and artists alike. Today, the answer is not complete but good enough to explain certain formations. Alan Turing, the English mathematician who was played by Benedict Cumberbatch in the imitation game. He introduced a concept to be known today as the Turing pattern. It was based on the foundation paper "The Chemical Basis of Morphogenesis" which he published in 1952. This paper describes The formation of patterns in nature such as the stripes, spots, and scales and how they can arise naturally in a homogenous and uniform state. The phenomena are governed by the diffusion and reaction theory of Morphogenesis.

Detail of skin pattern on side of Giant Pufferfish, Tetraodon mbu, showing resemblance to Belousov-Zhabotinsky reaction pattern. (public domain)
Detail of skin pattern on side of Giant Pufferfish, Tetraodon mbu, showing resemblance to Belousov-Zhabotinsky reaction pattern. (public domain)

Diffusion and Reaction equations

The Reaction and Diffusion are partial differential equations. They explain the governing phenomenon we mentioned previously. It occurs in a reaction with heterogeneous concentrations.

Diffusion and Reaction equations, where a(x,t) and b(x,t) describe the concentration of a and b correspondingly
Diffusion and Reaction equations, where a(x,t) and b(x,t) describe the concentration of a and b correspondingly

Diffusion

Diffusion is the spreading out of high concentration areas to the lower ones, in which the total amount is conserved. The solution of this part of the equation is described by the gaussian distribution, a bell-shaped curve. In order to, simulate this equation, we will rely on the finite difference method to compute this analytical solution.

The analytical solution for the gaussian distribution
The analytical solution for the gaussian distribution
The finite difference method version of the equation above
The finite difference method version of the equation above

The interesting part is yet to come introducing the Reaction part of the equations.

Reaction

It is not the time yet to get these interesting Turing patterns. First, we need to explore the second term which we said to be describing the reaction between the components ( they are two in our case, a and b). These functions result from the local concentration of each reactant and are mostly dependent on the chemicals in our hands (our lab to be on the safe side). For us to proceed further we must assume that the two components will reach a state of a stable equilibrium, e.g, homogenous concentrations.

with α and β being constants
with α and β being constants

With this solution, we get the value when they reach a steady state where a is equal to b equal to the cubic root of a.

Model

Combining these two we end up with a model of stripes. Scientifically speaking, a model in which the two parts of the equations are combined together resulting in one dimension as an alternating curve of concentrations and a pattern of stripes in two dimensions.

image by the author
image by the author

Stability

By tweaking the stability condition imposed previously, we get far more interesting patterns. In simple terms, we can adhere to the stability of a system when the perturbations do not break the homogeneity of the system. In short, let’s say we’re shaking the system a bit. One reactant will enhance producing the other one, the latter will diffuse into the neighborhood and lowers the concentrations of the first reactant. Hence, the form of the wave that we get. With different frequencies, we get a different behavior of the system. This is due to the amplitude of the instability. The initial conditions might also bring us to more aesthetic patterns by imposing symmetries on the system.

Results

Here are some of the interesting patterns that can be generated numerically through diffusion-reaction models

Gray-Scott model

Feed rate 0.037, Death Rate 0.06 (image by the author)
Feed rate 0.037, Death Rate 0.06 (image by the author)

Maze

Feed rate 0.029, Death Rate 0.057 (image by the author via tool)
Feed rate 0.029, Death Rate 0.057 (image by the author via tool)

Moving Spots

Feed rate 0.014, Death Rate 0.054 (image by the author via tool)
Feed rate 0.014, Death Rate 0.054 (image by the author via tool)

Waves

Feed rate 0.014, Death Rate 0.045
Feed rate 0.014, Death Rate 0.045
Feed rate 0.014, Death Rate 0.045
Feed rate 0.014, Death Rate 0.045

Conclusion: Computation For Interfaces

Photo by Tiago Almeida on Unsplash
Photo by Tiago Almeida on Unsplash

Even though the concepts behind these patterns seem very complex, they come from basic natural processes. It worth exploring these patterns to redesign our interfaces. The would result in more engaging interfaces that connect the users to nature in an abstract way. In the end, such patterns are somewhat wired to our minds. Even if an individual does not understand the Physics behind such patterns, she will be able to notice the aesthetics of such patterns. A great example of this is the work of Youssef Tekriti which can be found here. He takes these patterns and re-imagines them as engaging covers for more lively interfaces.

Great examples for the patterns incorporated in design and interface

The patterns might help us retrieve back our connection to nature, as they are generated following the same mechanism that is believed to produce the patterns found in skin, pigments, and in few natural surfaces.

Apple Watch interface, Photo retrieved from here, with permission
Apple Watch interface, Photo retrieved from here, with permission

The design is not limited to be the interface of products but also to bring a motif in the fashion design industry with a unique design.

Patterned Hoodie, Photo retrieved from here, with permission
Patterned Hoodie, Photo retrieved from here, with permission

Nonetheless, one can join his/her favorite song with psychedelic turning patterns bringing back the nostalgic feeling of Windows XP music player.

Spotify Music player interface, Photo retrieved from here, with permission
Spotify Music player interface, Photo retrieved from here, with permission

This article co-authored with my dear friend Youssef Tekriti. You can find more on his work here


Related Articles