"Lindenmayer Systems is a system of drawing line using simple string. The line is draw from a pointer (sometime called turtle). The pointer is controlled by a rule containing letters or symbols.",
[
["F", "Move forward and draw a line"],
["G", "Move forward without drawing a line"],
["+", "Rotate to the left"],
["-", "Rotate to the right"],
["[", "Save current state in a stack."],
["]", "Restore state from the top of the stack."],
],
"Move distance and turn angle is fixed.",
"Rules is generate by repeatedly replace a letter with another letter/string. For example.",
[
["X", "Starting rule"],
["X > FX", "Replace X by FX"],
["F > X+F", "Replace F by X+F"],
],
"By applying this rule 1 time, we will get",
[
["X", "Starting rule"],
["FX", "Apply the first rule, replacing X with FX"],
],
"The second iteration will be",
[
["F FX", "Applying the first rule, replacing X with FX"],
["X+F FX", "Applying the second rule, replacing F with X+F"],
],
"Notice that both rules are being applied at the same time, thus the seconds rule won't replace the letter replaced by the first rule. By repeating this operation many times, we can construct more complex shape.",
"You can also apply multiple rule to the same letter to randomize rule selection.",
[
["X > F+X", "Replace X by F+X"],
["X > F-X", "Replace X by F-X"],
],
"This rules mean every X has 50% chance to become F+X and 50% chance to become F-X.",