← Iris
Lab › Fractal Geometry

L-System Plants

Lindenmayer systems use string-rewriting rules to model plant growth. Each iteration expands the string, and the turtle-graphics interpreter draws lines and branches. Remarkably lifelike plants emerge from just a handful of production rules.

F → draw forward  |  + → turn left  |  − → turn right  |  [ → push state  |  ] → pop state


Aristid Lindenmayer was a biologist who introduced L-systems in 1968 to model the growth of algae. The key insight: biological growth is parallel — all parts of an organism develop simultaneously, just like string rewriting applies all rules at once.

The turtle-graphics interpretation maps the string onto drawing commands. F means "move forward drawing a line", + and - turn the turtle, and brackets [ ] save and restore position and angle to create branching. The result is a recursive, self-similar structure.

L-systems can model not just plants but also fractals (Koch snowflake, Hilbert curve), development of multicellular organisms, and even computer architectures. They are used in procedural generation of vegetation in games and films.