Reaction Diffusion System

Additive reaction diffusion image

Sample additive reaction diffusion image

I’ve been playing with some reaction diffusion generation algorithms, based on a pre-print paper sent to me by Jonathan McCabe. I whipped up this version in processing in an hour or 2.

The system works by adding together a simple reaction-diffusion system operating simultaneously at different scales. Each scale makes a different contribution to the concentration of a single chemical. By varying the effect at each scale, many different patterns emerge.

A further enhancement is to change the scale at each pixel and time step based on the amount of variation at each level: the level with the lowest variation ‘wins’ and contributes to the variation at that pixel. This gives some interesting multi-scale effects and a more complex surface results. My implementation is fairly crude and not very efficient, no doubt an OpenCL or GPU accelerated version might give real-time performance.

Multi-scale turing pattern

Multi-scale reaction diffusion image

Reaction diffusion seems to be undergoing renewed interest with the advent of high-speed GPUs and the accessibility of many good Java simulators on the web. Some links:

  • Robert┬áMunafo’s study of the Gray-Scott Model [link]
  • Information and simulation about the Grey-Scott Model [link]
  • A nice Java simulator and another.
Some videos