A while ago I became interested in `captured lightning‘ Lichtenberg figures, but without access to megavolt-scale physics gear, I wondered if I could simulate them in software instead. I was reminded of this when I had my JMM art exhibition entry printed on glass, as this would give me something a bit closer to the acrylic blocks. Some initially vague google searches eventually lead me to Diffusion-limited aggregation, a process that generates trees somewhere between ferns and lightning bolts. I set about implementing this in processing, and you can play around with a small version of it by clicking through here (may ask for permission to run java):

Controls: To set things in motion (or pause them), press SPACE. To restart, press R. You can cycle through various colour options with G, and toggle rendering of the random walks with W. The screen is redrawn after a fixed number of points have been tested, which can be decreased with Z or increased with X: if your computer is powerful enough, it can cope with updating the screen more often; even if it can’t, you can decrease this to 1 to watch a step-by-step construction.

How does it work? There is an initial core disc of points which are included in the structure, and its horizon – the distance of the furthest point from the centre – is tracked. New points are launched from a ‘birth’ circle with radius a fixed multiple (until the edge of the screen gets in the way) of the horizon; further out, there is a ‘killing’ circle. Once launched, points take steps in random directions of size large enough to move them within the horizon- although of course they may go the wrong way! If they ever cross the killing circle they are abandoned, and a new point launched; if they move within the horizon, they switch to taking steps of unit distance instead. If at any stage they bump into a point already in the structure, they stick to it: they stop moving, become part of the structure (possibly increasing its horizon, and thus pushing out the birth/killing circles) and a new point is launched. There’s a fixed maximum radius for the horizon, and once this is reached, no more points are launched.