Lindenmayer Trees
Procedural Trees and Fractals

Anaren sample

Languages, Tools & Keywords


L Systems

I developed an L-system implementation aimed at generating realistic plants and trees for my coursework. I began with a deterministic, context-free L-system (DoL System) to validate my outputs against established examples in the literature, using the conventions of Turtle Graphics.

Context Sensitive L Systems

Building on the deterministic model, I integrated context-sensitive L-systems to better mimic natural plant development. By taking into account the surrounding context of each symbol, my system can simulate how nutrients and hormones influence growth—resulting in stronger trunks near the roots and more delicate twigs toward the branches. This approach was inspired by techniques detailed in Algorithmic Beauty of Plants.

Branch Width

To enhance realism, I implemented a branch width feature that adjusts the thickness of branches based on their depth. Using variables such as InitialThickness and ContractionRatio, the system ensures that as the tree branches, each daughter segment gradually becomes thinner than its mother segment. This not only reflects natural growth patterns observed by Leonardo da Vinci and in botanical studies but also allows for dynamic coloring based on branch width.

3D Smooth Branching

In 3D mode, I extended the branch width logic to include smooth branching. The system uses preset configurations (specifically, preset 3 or Tree C) and applies incremental adjustments to the rotation angles on additional axes. As branches grow, the angle values increment when branching and decrement upon returning, resulting in thicker, more rigid trunks and more flexible, bending thinner branches. Leaves are placed at the tree's extremities with an autumn-inspired palette, enhancing the overall visual appeal.

3D Twisted Horror Branching

For a contrasting style, I developed an alternate 3D branching mode that introduces randomized angles along both the left and right axes. While still maintaining context sensitivity by adjusting angle values based on branch depth, this variant produces a more chaotic and dramatic structure—yielding trunks that appear sturdier amid wildly angled branches.

3D Chaotic Branching

I also combined elements from both smooth and twisted branching approaches to create a third option. This mode embraces the chaotic aspects of randomized angles while retaining some context sensitivity, resulting in tree structures that are both dynamic and visually striking.

User Interface

The user interface for generating these L-systems is designed to be both intuitive and powerful. Key variables include the Axiom, Predecessor, Successor, Angle, and Iterations. In addition, I incorporated parameters such as InitialThickness and ContractionRatio to control branch dynamics. To keep the system accessible, I limited the production rules to a maximum of two, ensuring a straightforward yet flexible tool for creating diverse plant and tree structures.