Implementation of the Reaction Diffusion Simulation

Thursday, April 2nd, 2009

blood.png Update – This post was written before the release of Silverlight 3.0b, which provides a number of enhancements relevant to this implementation, such as a WriteableBitmap and Pixel Shaders

Rendering

The first obstacle to implementing the RD simulation is that Silverlight 2.0 does not by default provide a means of generating dynamic images. WPF has a WriteableBitmap, but no equivalent exists in Silverlight. However, it does support PNG streams so we can dynamically update a bitmap by encoding it to PNG on the fly. For this I have used Joe Stegman’s PNGEncoder class, which I have modified slightly to deal with RGB data and to reduce memory usage.
(more…)

Reaction-Diffusion Models

Monday, March 23rd, 2009

maze.png

One of Alan Turing’s many contributions to mathematics and science during the 20th century was his 1952 paper on “The Chemical Basis of Morphogenesis” in which he suggested that a simple model of coupled differential equations could account for pattern formation in natural processes such as those found on animal coats. Such models are known as Reaction-Diffusion models, and take the following general form

\frac{\partial}{\partial t}\mathbf{q}=\mathbf{D}\nabla^2\mathbf{q}+\mathbf{R}(\mathbf{q})

(more…)

URM Emulator

Sunday, January 25th, 2009

The Unlimited Register Machine (URM), designed by Nigel Cutland, is an abstraction of a computer similar to the Turing Machine – but somewhat easier to get to grips with and more in tune with the operation of a modern computer processor.

It also happens to be the model used by the Open University’s course on Mathematical Logic and Number Theory, and is the reason for this article since I studied the course in 2007.

(more…)