Lindenmayer systems - Mathematical rules that generate nature's patterns
L-Systems (Lindenmayer systems) are formal grammar systems developed by biologist Aristid Lindenmayer in 1968 to model the growth of plants. They use simple recursive rules to generate complex, self-similar patterns that closely resemble natural branching structures in trees, ferns, algae, and other organisms.
Each branch follows the same production rule: F → F[+F][-F], where F means "draw forward" and [+/-] control branching angles.
The same pattern repeats at every scale, creating fractal structures where each part resembles the whole.
Random variations in angles, lengths, and branching decisions create organic, natural-looking structures.
L-Systems model real plant growth mechanisms, including apical dominance, branching probability, and resource distribution.
The L-System Fractal Tree Generator is an interactive browser tool that renders fractal plant structures using Lindenmayer systems (L-systems), a formal grammar originally developed by biologist Aristid Lindenmayer to model plant growth. Users can select from preset L-system rules or define custom production rules, adjust branching angle, recursion depth, and segment length, and watch the fractal grow step by step on an HTML5 canvas.
L-systems work by applying string rewriting rules iteratively: a simple axiom like "F" expands across multiple generations into a long string of symbols, which is then interpreted as turtle graphics drawing commands. The result is a richly branching tree that mimics the self-similar structure of real plants. The generator adds natural variation through randomized branch angles, producing trees that look organic rather than perfectly geometric.