The rock-paper-scissors-lizard-Spock reaction-diffusion equation on the sphere.
Channel: Nils Berglund
Date: 2024-02-28

This video shows a spherical analogue of the "rock-paper-scissors-lizard-Spock" reaction-diffusion equation, that appears for instance in the video https://youtu.be/-Qap_7skcIA 
The game Rock-Paper-Scissors-Lizard-Spock was originally created by Sam Kass with Karen Bryla for the sitcom Big Bang theory (see https://youtu.be/x5Q6-wMx-K8 ). It is a variant of the Rock-Paper-Scissors game, in which each of the five words beats two others, and is beaten by the two other ones:
- Rock (red) beats Scissors and Lizard, and is beaten by Paper and Spock
- Paper (yellow) beats Rock and Spock, and is beaten by Scissors and Lizard
- Scissors (green) beat Paper and Lizard, and are beaten by Rock and Spock
- Spock (blue) beats Scissors and Rock, and is beaten by Lizard and Paper
- Lizard (purple) beats Spock and Paper, and is beaten by Rock and Scissors
This simulation shows a solution of a reaction-diffusion equation that imitates the game. There are five chemicals, which diffuse, and transform into each other. Each chemical can convert two other ones into its own type, while it is converted by the other two. 
The reaction-diffusion equation is defined as follows. Denoting by rho = u + v + w + x + y  the total concentration, the system of equations is given by 
d_t u = D*Delta(u) + u*(1 - rho - a*v - a*x)
d_t v = D*Delta(v) + v*(1 - rho - a*w - a*y)
d_t w = D*Delta(w) + w*(1 - rho - a*x - a*u)
d_t x = D*Delta(x) + x*(1 - rho - a*y - a*v)
d_t y = D*Delta(y) + y*(1 - rho - a*u - a*w)
where Delta denotes the Laplace operator, which performs a local average, and the parameters a and D are equal to 0.75 and 0.075. Terms such as a*v, a*x, and so on denote reaction terms, in which one of the five chemicals is beaten by another one. 
The color hue indicates the predominant chemical, while the radial coordinate depends slightly on how fast the chemical concentration varies locally: it is slightly smaller where this variation is fast, creating small dips between the colors. 
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. 

Render time: 53 minutes 54 seconds
Compression: crf 23
Color scheme: HSL/Jet

Music: "Ipanema Daydream" by Bird Creek

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 https://hplgit.github.io/fdm-book/doc/pub/wave/pdf/wave-4print.pdf 
C code: https://github.com/nilsberglund-orleans/YouTube-simulations
https://www.idpoisson.fr/berglund/software.html

#reaction-diffusion #spirals #rock-paper-scissors