L-System Grower
Two or three lines of rules, applied over and over to themselves, come out as a fern. Edit a rule or pull the angle around, and the next one draws itself in front of you.
What the letters mean
Fdraw a line forward, and move to its end
Gthe same, so a rule can tell two kinds of edge apart
f gmove forward without drawing
+ -turn left, turn right, by the angle above
|turn right round
[ ]remember where you are, and go back to it
A .. Zanything else is a placeholder: it draws nothing and
only exists to be replaced
A rule is one letter, an equals sign, and what it turns into.
F = FF doubles every line each round.
-> works in place of =, and anything after
a # is ignored.
Give a letter more than one rule and one is picked at random each
time it appears, so every plant of that species comes out different.
Put a number before the equals sign to weight the choice:
F 0.7 = F[+F]F against F 0.3 = F[-F]F.
New seed rolls the dice again. A rule may also turn a letter into
nothing at all: write F = and leave the right side empty.
Rounds stop early if the string would pass 1.5 million letters, and drawing stops at 300,000 lines, whichever comes first. It says so under the picture when it happens.