L-systems


About this app

An L-system or Lindenmayer system is a type of formal grammar that can be used to generate self-similar fractals. This application uses JavaScript and the JSXGraph.js library to execute various L-systems and create an image using turtle graphics.

Next table shows the meaning of the characters used in the axiom and rules:

FTurtle moves forward and draws a line
fTurtle moves forward without drawing
A...Z (except F and only capitals)Parameters used in the evolution, but without any turtle action
1Deleted in every iteration, except in the end where it represents F
+Turtle turns left
-Turtle turns right
|Turtle turns around (180 degrees)
[Remember current position and angle (and add to stack)
]Return to last stored position and angle (and delete from stack)

Application canvas

Control panel

Pick a fractal: