L-System, or Lindenmayer System, is a mathematical formalism originally developed by the biologist Aristid Lindenmayer to describe the growth of simple multicellular organisms. While Lindenmayer initially studied algae and fungi, the L-System was eventually applied to plants and other more complicated structures.
L-Systems can also be used to generate fractal patterns. While I had done something very similar in earlier studies of branching patterns, this time around I actually wanted to see the pattern being drawn. As such, I had to create a simple turtle object that takes the position, angle, and length as the initial parameters and draws a line accordingly.
From there, it was just a matter of creating an iterative structure in the software and setting the rules as to when branches should form, at what angle, and what size. Of course, when writing iterative programs, it’s important to set a breakpoint so that it stops at some point, and doesn’t continue indefinitely. In my studies, I set it so that if the length of a branch is less than 10 pixels in length, it no longer reproduces.
Below are a few images generated by the program:
Videos showing fractals being drawn using the L-System: