Click the image on the left to view the canvas demo.
This is an example of diffusion limited aggregation - a natural process where randomly moving particles stick together, to form clusters. A good example is crystals.
An initial seed is fixed in place, then particles are randomly moved around until they hit part of the main cluster, where they stick. This leads to a bigger cluster and feeds back on itself, producing a stochastic fractal (Stochastic means a random process)
I wrote this after looking at the C code for "diffuse.c" from The Computational Beauty of Nature (see books). An optimisation I copied from there is to constrain the particles to within 10 pixels either side of the cluster, to stop particles wandering off where they would never hit anything. This shouldn't have too much effect on the resulting graphics but is much faster (especially at the start)