About this app
In this simulation, you can model lightning bolts using stochastic branching. Each branch grows according to a few simple probabilistic rules. At each step, a new line segment grows in a direction chosen randomly within an allowed turning angle. There is also a probability that a side branch will form and extend into unused space. The same process then repeats from every new segment. You can adjust parameters such as branch length, turning angle, branching probability, and how strongly new branches avoid crowded places.
See whether you can adjust the controls to create realistic-looking lightning bolts. Can you also find settings that produce branching patterns resembling a tree, plant roots, blood vessels, dendrites, river networks, or electrical streamers from a Tesla coil? Stochastic branching seems to be everywhere in nature.