Drive turtle graphics from a short axiom plus rewrite rules. Each iteration expands every symbol in parallel. You see the final polyline scaled to the canvas, string length, stroke color you pick.
One extra iteration often multiplies symbol count far more than newcomers expect. If the page stutters, drop depth first, then shorten rules.
Lindenmayer systems rewrite every symbol in the current string at once. Two short rules plus six iterations routinely cross tens of thousands of characters. The visualizer still draws, yet your device fans tell the truth.
We cap depth at eight so casual browsers avoid accidental freezes. For publication-quality exports you would still export vector data elsewhere. Here the goal is quick feedback while you learn how axiom choice steers the silhouette.
Any other single character (for example X or Y) is a structural placeholder you rewrite until only motion symbols remain, or until you stop iterating.
You type an axiom, list productions with = or ASCII arrow, then pick iterations. The engine expands left-to-right, substituting each head symbol with its body or leaving it unchanged when no rule exists. After expansion, the turtle walks the final string once.
Auto-fit measures every vertex the turtle visits, then scales plus centers the polyline inside the frame. Shrinking step length does not shrink the overall shape forever. It changes local detail density while bounds tracking keeps the whole figure visible.
If you want grammar editing without the scaling stage, open the L-System Fractal Generator. Prefer classic snowflake geometry with dedicated sliders? Use the Koch Snowflake Generator. Branching silhouettes without writing productions first appear in the Fractal Tree Generator.
| Tile | Axiom | Angle | Notes |
|---|---|---|---|
| Koch | F | 60° | Three-fold snowflake spine. |
| Sierpinski | F-G-G | 120° | Two symbols, two productions. |
| Plant | X | 25° | Heavy brackets, organic feel. |
| Tree | F | 25.7° | Symmetric branching. |
| Fern | X | 25° | Longer expansion than plant preset. |
| Dragon | FX | 90° | Uses helper symbols X, Y. |
Every opening bracket freezes the turtle where it stands. The interpreter pushes x, y, heading. A closing bracket teleports back without drawing a connecting segment. Botanists used this trick long before GPU instancing: one stem forks, draws a twig, returns, draws another twig.
If your plant looks like a scribble, count brackets. Odd depth usually means a missing closer or an extra opener on one production line. The turtle never guesses intent. It only executes the expanded string in order.
There is no stochastic rule picker, no 3D turtle, no texture export. Stochastic L-systems need random seeds per run. 3D needs another rotation command set. You also will not find file upload: the grammar lives in the textarea only.
Processing stays in your tab. Clear the canvas when you finish if someone else uses the machine. The expanded string panel is optional eyeballing for students tracing symbol blow-up.
Short answers tied to this turtle implementation.
Auto-fit recomputes bounds from every drawn vertex. Spinning the heading rotates the whole polyline. If every segment collapses to a dot because rules never emit F or G, you will see an empty frame. Add a motion symbol or raise iterations so placeholders unfold.
Leading or trailing spaces on each line are trimmed. Spaces inside the replacement string count as literal characters, which usually breaks single-letter turtle commands. Keep productions tight unless you intentionally embed blanks.
Dragon-style axioms mix two non-drawing symbols before the string fills with turns and steps. Length grows faster than intuitive estimates, so the turtle executes more commands per depth step. Drop depth or lighten step length before blaming hardware.
No server round trip runs here. The script reads your fields, expands the string in memory, paints the canvas, and stops. Refreshing the page clears everything unless your browser restores form fields.