I first dabbled with Diffusion-Limited Aggregation algorithms some 5 years back when I read about them in a book (later note: that book was Nexus: Small Worlds and the Groundbreaking Theory of Networks). The version I wrote was monumentally slow because it was a crappy implementation in a slow language for heavy computations (i.e. Python), but it worked well enough to create some good results like this:
After about 3 or 4 failed attempts to optimize this program to not take days to generate images, I finally rewrote it reasonably successfully in Processing which I’ve taken a great liking to recently. I say “reasonably successfully” because it still has some bugs and because I can’t seem to tune it to produce lightning-like images like this one, just much more dense ones. Annoyingly, I did not keep any notes about how I made this image, so I have only a vague idea. It was from the summer of 2005 in which I coded eleventy billion really cool little generative art programs, but took very sparse notes about how I made them.
It was only a few hours of coding total. Part of why I like Processing is the triviality of adding interactivity to something, which I did repeatedly in order to test that the various building-blocks of the DLA implementation were working properly.
The actual DLA applet is at http://openprocessing.org/visuals/?visualID=10799. Click around inside it; right-click to reset it. The various building blocks that were put together to make this are: here, here, here, here, and here.
These are at OpenProcessing mostly because I don’t know how to embed a Processing applet in Wordpress; perhaps it’s better that I don’t, since this one is a CPU hog. (Later note: I wonder if I can just host these examples inline using Processing.js…)
This blog also has an entire gallery of generative art with Processing that I think is great: http://myecurve.wordpress.com/