[Weird flickering fixed - see this post]

My experiments with reaction diffusion simulations continue with an AGAL implementation of a slightly lesser known model: the Willamowski–Rössler equations. After some pottering on the internet, I stumbled across this code in C which is a partial representation of work done by Goryachev and Kapral in Physical Review Letters, Volume 76, Number 10, 1619 (4 March 1996). 

Fifteen cups of tea later, the C is successfully ported to AGAL!

The different chemical species are mapped to the red, green and blue components of the AGAL fragment shader. Willamowski–Rössler expects an impressive ten parameters along with D and dt values that control multipliers on the Laplacian and reaction diffusion terms.

The D and dt values are pretty sensitive and a small change can send the simulation flying off into infinity.

As with my other AGAL experiments, I've created a simple test harness. The class WillamowskiRosslerRenderer does all the hard work. I started making my life a little easier by using sensibly named place holders in the raw AGAL and replacing them before assembling. 

My plan now is to extend my AGAL Reaction Diffusion Explorer by plugging in this code and my Belousov Zhabotinsky shader so that users can switch between the three reaction diffusion models.

The demo is available here and, as always, the source code is available here.


0

Add a comment

About Me
About Me
Labels
Labels
Blog Archive
Loading