L-System Plant Growth
A procedural grammar grows a branching structure with turtle graphics, revealed segment by segment.
Drag to orbit · scroll to zoom · plant regrows a new random variant automatically

An L-system (Lindenmayer system) is a formal grammar: a starting "axiom" string is rewritten again and again by replacing each symbol with a longer string according to a set of production rules, producing an ever more complex sequence of instructions. To turn that string into a shape, a "turtle graphics" interpreter walks through it character by character, treating each symbol as a command — move forward and draw a segment, turn by a fixed angle, or push/pop a branch point on a stack — which naturally produces branching plant-like structures. L-systems were developed in 1968 by biologist Aristid Lindenmayer to model the cellular growth patterns of algae and, later, the branching architecture of trees and plants. Because the same few rules are applied recursively, the resulting shapes are self-similar at multiple scales, much like real botanical growth. Today the same technique powers procedural vegetation in games and VFX tools such as SpeedTree.

Characteristics

Controls