Welcom to "Turing Pattern" generator, you can try generating your own turing pattern from various parameters. You can tune parameters by yourself or select presets. Additionally, you can click on the right image to get the parameters for a pattern shown in the image.

How to use.


What is Turing Pattern?

It is a mathemetical model that models how patterns in nature emerge, for example dotted pattern on leopard or finger print. In this model, it consists of substances, A and B. These two substances diffuse into space and substance A diffuses two time faster than substance B. There are three reactions happen in this model.

  1. A concentration of substance A increase inversely propotionally to its concentration.
  2. A concentration of substance B decrease propotionally to its concentration.
  3. Combination between two substance A and one substance B results in three substance B.

The dynamic of the system can be described by two differential equations:

\(\frac{\partial A}{\partial t} = D\nabla^2 A - AB^2 + F (1 - A) \)

\(\frac{\partial B}{\partial t} = 0.5D\nabla^2 B + AB^2 + (F + K) B \)

\(\nabla^2 A\) and \(\nabla^2 B\) describe the diffusion of the substances. In this implementation, these terms are implemented by 2D lapacian. The term \(F(1 - A)\), \((F + K)B\) and \(AB^2\) describe the first, second and third reaction respectively. \(D\) is diffusion rate. \(F\) and \(K\) are parameters that control rate of the first and second reaction. By changing these three parameters, different pattern will emerge.

The image below shows various patterns from different value of \(K\) and \(F\). Y axis ranges from \(F=0.01\) to \(F=0.095\) and X axis ranges from \(K=0.032\) to \(K=0.07\), notice that patterns emerge only in this small region and seem to group up along the curve. I stretch the area around the curve inside an orange polygon into square as you can see at the demo.

One of the interesting fact is when we find the value of A and B that makes the system static. In other word, the values that makes \(\frac{\partial A}{\partial t}\) and \(\frac{\partial B}{\partial t}\) equal to zero.

NOTE: We will ignore the diffusion term (because I have no idea how to analyse the equation with them, someone help me!!!!).

There are three fixed points in total.

We can see that second and third solution exist if \(F^2 > 4F(F+K)^2\). If we plot the graph \(F^2 = 4F(F+K)^2\) onto the above picture, this graph interestingly lies in the area where patterns densly packed. This maybe just a conincident or there really are relations between how pattern emerges and the graph. I actually do not know. I may have to study more on this topic.

Reference:

For interested reader who may want to find further sources on this topic, these are the list of resource I used in this project.

  1. https://karlsims.com/rd.html
  2. https://itp.uni-frankfurt.de/~gros/StudentProjects/Applets_2014_GrayScott/
  3. https://www.redblobgames.com/x/2202-turing-patterns/