The same rules in 3D, with a turtle that can pitch and roll, are on the L-system 3D page.

Iter

The systems are in one text file, 2d.l, and are read, rewritten and walked by lib/larsi.org/lsystem-3d.js, the same code that draws the L-system 3D page; this page draws the lines it hands back as SVG. A system is a name, an Angle (one turn is 360 / Angle degrees), an Axiom (where it starts) and rules such as F=F+F--F+F, which replace a symbol. Pick the iterations: 0 is the axiom, and each one replaces every symbol that has a rule.

The engine does not build the long rewritten string. A symbol with a rule is replaced by it as the turtle reaches it, as many levels deep as you ask for, and at the last level every symbol is a command. If the picture would pass 3,000,000 lines, the engine draws the deepest iteration that fits and the note under the controls says which.

F   G
Move forward one step, drawing a line (F) or not (G).
+   -
Turn left / right by one angle; a number after it counts them (+3 is three).
|
Turn around.
[   ]
Remember the turtle and go back to it: a branch.
*
Swap + and - until the next *, so a rule can draw its mirror image.
@
Scale the step: @0.5 halves it, @I2 divides by 2, @Q2 multiplies by the square root of 2.
'   <   >
Colors, as in Fractint: '12 sets color number 12, <3 adds 3 to it and >3 subtracts 3 (the 256 colors wrap round). The turtle starts with color 15, white; a system that sets colors is drawn in them on black, with the palette of Fractint's default.map, and the others in one color.

Every other letter does nothing when it is drawn: it is there to be rewritten. The turtle starts pointing east. The 3D page uses the same engine with more symbols (pitch, roll, line width, colors, leaves) and starts pointing up.

The 96 systems are all of Fractint 20's L-system files: fractint.l (most are Adrian Mariano's), fract205.l (Anthony Hanmer's curves and tiles), penrose.l (Penrose tilings by Philippe Hurbain) and tiling.l (tilings and spirals by Herb Savage). I converted them to the notation of The Algorithmic Beauty of Plants (Prusinkiewicz and Lindenmayer, 1990) that most L-system programs follow. The conversion changes little: letters are upper case, * replaces Fractint's ! (which in the book is the line width), and Fractint's color commands c, < and > are ', < and >. Four systems (DoubleCesaro, AmmannPoly, AmmannPolyColor and VoderbergTile) use Fractint's second heading, which it turns with \N and /N in degrees and draws with d and m; they are written with Angle 360, so -N and +N turn by N degrees and F and G replace d and m.

To be sure the conversion lost nothing, I wrote a second turtle straight from the source of Fractint's lsys.c (its number parsing, its turning of the one-unit + and -, the heading in degrees, the 256 colors and the way [ and ] remember them), and drew every system with both, from iteration 0 up to 5 (or as far as fits): all 565 pictures have the same segments in the same order, and the same colors. That check found one system whose conversion had turned the wrong way, DoubleCesaro, which is now the mirror image of what this page used to show.

This page was created with Claude Code.