A Lindenmayer system (L-System) is a formal grammar that models the growth processes of plant development. It starts with an initial state (Axiom) and iteratively applies rewriting rules.
Here, the axiom is X, and the rules are:
X → F+[[X]-X]-F[-FX]+X
F → FF
This sequence of characters is then interpreted as turtle graphics (F: draw forward, +/-: turn, []: push/pop state) to generate fractal foliage.
Click 'Grow' to iterate the grammar and watch the structural complexity compound algorithmically.