L-systems describe plant growth using a substitution grammar paired with a tiny “turtle” cursor. The
turtle walks forward, turns, and branches as it reads each symbol from the expanded string.
- F: draw a branch segment forward.
- f: move forward without drawing.
- +/-: rotate heading left/right by the turn angle.
- [/]: push/pop position + heading to create forks.
- Start with the axiom. Example:
FX.
- Expand using each rule. After one pass with rules the string might become
FX+YF+.
- Draw by feeding the final string to the turtle: every
F moves the pen,
every turn symbol rotates it, and brackets create stacked branches.
Quick Recipes
Select a recipe to load it into the editor instantly.