Fractal Trees

Consider the following simple algorithm:

We start with a single painted particle moving upwards at a decreasing velocity, with a trajectory that is slowly rotating at a constant velocity. At each step, there is some small probability for the particle to “split” into two particles, one of which begins rotating in the opposite direction. And if a particle’s trajectory is ever about to start turning downwards, it instead reverses its angular velocity and begins turning upwards.

Those are all the rules. So what sort of shapes does this incredibly simple algorithm generate? Take a look!



It might be unbelievable that such a simple algorithm could generate such complex and organic shapes, but you can try it for yourself: the images above are produced by only 25 lines of code! And of course, it makes one very curious about whether there is a real connection between this algorithm and the way that plants actually grow.