Visualize an L-System

Expand and draw Lindenmayer systems with turtle graphics

Examples:

  • Quadratic Koch: axiom F, rule F → F+F-F-F+F, angle 90
  • Plant: axiom X, rules X → F[+X]F[-X]+X and F → FF, angle 25
  • Symbols: F draw, + left, - right, [ push, ] pop

Related tools

What is an L-System?

A Lindenmayer system (L-system) rewrites a string using production rules. When interpreted with turtle graphics, symbols like F draw forward while + and - turn, producing fractals and plant-like shapes.

Why Visualize L-Systems?

  • Education: Show recursive rewriting visually
  • Fractals: Recreate Koch, plant, and bush patterns
  • Design: Prototype generative geometry quickly

How This Tool Works

Provide an axiom, rules (one per line as F -> F+F), iteration count, and angle. The tool expands the string, then draws F/G/A/B as forward strokes with [ and ] for branching. All work stays in your browser.

Related Tools

  • Generate Random Matrix: Random numeric grids
  • Draw Pascal's Triangle: Deterministic combinatorial arrays
  • Generate Pi Digits: High-precision constants