Diffusion Limited Aggregation

My main Grasshopper development these days is Kangaroo, which is nearing a beta-release, but in the meantime here's another little bit of physics based messing around from a while back that I felt like sharing.
DLA is a simple algorithmic model of a type of fractal growth that produces dendritic forms which occur frequently in both living and non-living nature, introduced in 1981 by Witten and Sander in this paper(pdf).
It has become quite popular as a generative design tool in recent years.
The forms produced are similar to certain lichens, corals, crystals, brains, veins, rivers, tree roots, etc...
In its basic form it is remarkably simple - Starting with some seed points, particles are introduced one at a time, then they wander around randomly until touching part of the existing cluster, at which point they stick to it and the process repeats.
As growth this way can be rather slow I implemented a few features to speed things up, such as wrapping the boundaries of the space, having an adaptive boundary from which the particles start, and an optional gravity pulling particles in towards the cluster..
The script I wrote works in 2D or 3D, and you can grow your dendrites on whatever starting geometry you choose. There are also a few options for different physical forces to shape the growth.
Have fun!
DLA.ghx (download the one below for compatibility with the latest Grasshopper version)
**Update May 2013**
Due to changes in Grasshopper since the script above was first shared, it no longer runs in the current version. Here's an updated version of the script:
Load Previous Comments
  • Ilona Pinto de Araujo

    Hi everyone, I know this topic is old, but I just wanted to share a gh definition for DLA using Anemone, for those who doesn't use VB. It is may be not the cleanest way to do but it works (inspired by this paper :https://wooj.files.wordpress.com/2012/10/gsd-fall-2012-dla-system.pdf)

    DLA_V0.gh

  • Lee Souder

    Thanks Ilona!!!

  • Chris

    Just noticed a small irregularity in the code, it creates patterns that are more square than they should be. This is due to the random vectors for the start points of the Floater. You are creating random values for x, y and z, then you are unitizing the vector. This means that the initial positions are evenly distributed in a square or cube and then projected onto the circle or sphere, but there will be more initial positions located along the diagonal than along the axes. In a square from -0.5 to 0.5 you could ignore those initial positions that have a length of more than 0.5. Not sure though if anybody still does DLA these days...