@NilsBerglund
  @NilsBerglund
Nils Berglund | The Rock-Paper-Scissors equation on the sphere, with improved behavior at the poles @NilsBerglund | Uploaded April 2024 | Updated October 2024, 3 minutes ago.
This is a remake of videos such as youtu.be/YaoqL0d573w , showing a simulation of the Rock-Paper-Scissors reaction-diffusion equation on the sphere. The difference is that the control of the behavior near the poles has been improved. The previous videos used a rectangular simulation grid that became very dense near the poles, requiring a regularization procedure that slowed down the dynamics. Here the grid points have been reduced near the poles by a blocking procedure, so that almost no regularization is required.
The reaction-diffusion equation is defined as follows. At each point in space and time, there are three concentrations u, v, and w of chemicals, which we may call Red, Blue and Green. Denoting by rho = u + v + w the total concentration, the system of equations is given by
d_t u = D*Delta(u) + u*(1 - rho - a*v)
d_t v = D*Delta(v) + v*(1 - rho - a*w)
d_t w = D*Delta(w) + w*(1 - rho - a*u)
where Delta denotes the Laplace operator, which performs a local average, and the parameter a is equal here to 0.75 while D is constant, equal to 0.2. The terms proportional to a*v, a*w and a*u denote reaction terms, in which Red is beaten by Blue, Blue is beaten be Green, and Green is beaten by Red. The situation is thus similar to the Rock-Paper-Scissors game (see en.wikipedia.org/wiki/Rock_paper_scissors ), and there exist simpler cellular automata with similar properties, see for instance softologyblog.wordpress.com/2018/03/23/rock-paper-scissors-cellular-automata
The video has four parts, showing the same simulation with two different color gradients, and two different visualizations:
First chemical, 3D: 0:00
Predominant chemical, 3D: 1:44
First chemical, 2D: 3:33
Predominant chemical, 2D: 5:18
In parts 1 and 3, the color hue and radial coordinate depend on the concentration of the first chemical. In parts 2 and 4, the color depends on the most abundant chemical, though the other two chemicals can still be present, which is why some color patches disappear or appear out of the blue. Parts 3 and 4 show an equirectangular representation of the sphere.
The equation is solved by finite differences, where the Laplacian is computed in spherical coordinates. Some smoothing has been used at the poles, where the Laplacian becomes singular in these coordinates. The color hue and radial coordinate show the value of the concentration u of one of the chemicals. The point of view of the observer is rotating around the polar axis of the sphere at constant latitude.

Render time: Parts 1 and 2 - 1 hour 7 minutes
Parts 3 and 4 - 58 minutes 16 seconds
Compression: crf 23
Color scheme: HSL/Jet

Music: "Waltz of the Flowers" by Tchaikovsky

See also https://images.math.cnrs.fr/Qu-est-ce-qu-une-Equation-aux-Derivees-Partielles-Stochastique.html for more explanations (in French) on the Allen-Cahn equation.

The simulation solves a reaction-diffusion equation by discretization. The algorithm is adapted from the paper hplgit.github.io/fdm-book/doc/pub/wave/pdf/wave-4print.pdf
C code: github.com/nilsberglund-orleans/YouTube-simulations
https://www.idpoisson.fr/berglund/software.html

#reaction-diffusion #spirals
The Rock-Paper-Scissors equation on the sphere, with improved behavior at the polesEnhance 57-19: DNA replication (long version)[Flash warning] A planar wave crossing a gradient index lens at an angleAn asteroid impact in the South Atlantic, modeled with a shallow water equationCreating rotating waves in a circle with fifteen angled secondary cavitiesPentagonal foam with gravityAn equatorial asteroid impact in the Pacific OceanUnzipping DNA with enzymes (a simple model)Hexagons make nice sand pilesViewer request: Simulation of an asteroid impact off the coast of CaliforniaAn asteroid impact in the North Pacific Ocean, with tsunami-induced floodingCherenkov radiation of an even faster particle

The Rock-Paper-Scissors equation on the sphere, with improved behavior at the poles @NilsBerglund

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER