Gray-Scott reaction-diffusion java applet

Micro controllers
Vector graphics

My java applets were developed a long time ago and have not been digitally signed. Nowadays a browser will typically not allow a java applet to run unless it is signed. Getting the applets signed is somewhat expensive, and since I no longer do any java development it is unlikely that I will get the applets signed. It it still possible to run the applets, but in that case you will need to change the security policy of your browser to allow unsigned applets to run.
How can patterns be formed by chemical reactions? A first answer to this question was provided by Alan Turing, who specified mathematical conditions necessary for it to be possible to form spatial patterns in two-component reaction-diffusion systems.

The java applet on this page simulates diffusion and reaction between two chemicals U and V.

U + 2 V -> 3 V

The chemical U diffuses faster than V, and is used as fuel to produce chemical V, while chemical V catalyzes its own production.

reaction-diffusion dynamics

This particular reaction-diffusion model is known as the Gray-Scott model , and it is one of the most well studied reaction-diffusion models. In addition to the diffusion constants the model also has two more parameters - f and k. The parameter f regulates how fast fuel (U) is added to the system, while k regulates the rate with which the product (V) is removed from the system. Depending on the parameters this system can form a rich variety of different patterns. For example:

The U + 2V -> 3V Gray-Scott reaction may be more of a thought experiment than an actual chemical reaction, but there are also real chemicals with similar pattern forming reactions. One famous example is the Belousov-Zhabotinsky reaction (see also this very nice Belousov-Zhabotinsky video on youtube).

Java simulation

The java simulation uses periodic boundary conditions, i.e. the top edge is folded to meet the bottom edge, and left edge is folded to meet the right edge, as if the lattice was wrapped around a torus. The colors show the concentration of U. Black is the lowest concentration, increasing through red and yellow, to green which corresponds to the maximum concentration.

Lattice sizes
The applet is currently using a 220x220 lattice. Reload the applet with a :
The source code for the applet is available on request.

a map of representative gray-scott configurations
Above is a map of representative configurations for different combinations of the parameters f and k.
Parameter f varies along the x-axis and is in [0.01, 0.028].
Parameter k varies along the y-axis and is in [0.05, 0.095].