WebGL Shader for a Gray-Scott reaction diffusion system
Live demo at apps.amandaghassaei.com/ReactionDiffusionShader/
This is a simulation of a Gray-Scott reaction-diffusion system, running in a GPU shader.
The parameters for this model are F = 0.0545 and K = 0.062. With these parameters the system forms a mitosis-like pattern, where small cells divide and spread across space.
Reaction diffusion patterns are interesting, but they can be difficult to control in meaningful ways for design purposes. In this project I added an underlying vector field that controls the orientation of diffusion across the system to produce directed, global patterns. Click on the screen to change the location of the sinks in the vector field.
If this simulation is not performing well on your computer, resize your browser's window to make the simulation smaller.
The math used to created oriented diffusion in this system is discussed in the papers Display of Vector Fields Using a Reaction-Diffusion Model and Reaction-Diffusion Textures.
More info about ways to control these systems can also be found on Karl Sims' Webpage.
Information about programming a reaction diffusion system on the GPU is here: A reaction-diffusion simulation using WebGL.
By Amanda Ghassaei, code on Github.