L-System Playground Name Foo Bar Axiom Rules F => F+F--F+F Angle Iterations Shortcuts

Axiom is the initial state of L-System before any of the rules are applied. Axiom corresponds to zero iterations. The following commands can be used: fghiFGHI — move and draw line in the current direction

— move and draw line in the current direction other letters — no action; can be used for substitution rules

— no action; can be used for substitution rules [] — push/pop current position and angle to/from stack

— push/pop current position and angle to/from stack -+ — rotate around Z axis (clockwise/counter-clockwise)

— rotate around Z axis (clockwise/counter-clockwise) <> — rotate around X axis (tilt left/right)

— rotate around X axis (tilt left/right) ^& — rotate around Y axis (pull up/down) The following commands can be used:

Rules are applies to L-System state on each iteration. These are simple substitution rules which replace letters (aka chars) with strings. If no rules can be applied, L-System state doesn't change. Rules syntax: <rules> ::= <rule> [<new line> <rule>]*

<rule> ::= <char> " => " <string> The following commands can be used: fghiFGHI — move and draw line in the current direction

— move and draw line in the current direction other letters — no action; can be used for substitution rules

— no action; can be used for substitution rules [] — push/pop current position and angle to/from stack

— push/pop current position and angle to/from stack -+ — rotate around Z axis (clockwise/counter-clockwise)

— rotate around Z axis (clockwise/counter-clockwise) <> — rotate around X axis (tilt left/right)

— rotate around X axis (tilt left/right) ^& — rotate around Y axis (pull up/down) Rules syntax:The following commands can be used:

Rotation angle in degrees used by commands "-+<>^&" (full rotation is 360 degrees).

Amount of times the substitution rules will be applied to L-System state starting with axiom. Note that rules often have exponential complexity so specifying too many iterations can freeze the browser. (For most built-in L-Systems more than 8 iterations is already too much.)