Check out wikipedia for a pretty good explanation of l-systems. Here's a quick summary: The picture on the left is generated by "drawing" the string generated by the parameters on the right. How is the string generated? How does a string get "drawn"?

How a string gets generated:

- We start with the string in the "Axiom" box
- We loop through it however many times it says to in the "Recusion" box
- When we loop through the string, ever time we see a letter that's on the left side of a colon in the "Rules" box, we replace it with whatever is on the right side of the "Rules" box

Here's how the default example gets generated:

- X (we start with the axiom)
- F[+X]F[-X]+X (All the X's were replaced with F[+X]F[-X]+X)
- FF[+F[+X]F[-X]+X]FF[-F[+X]F[-X]+X]+F[+X]F[-X]+X (All the F's were replcaed with FF and all th eX's were replaced with F[+X]F[-X]+X)
- As you can see this string grows exponentially so imma stop right here but imagine doing this 6 times

How to "draw" a string

- We start with a stack of (x, y, theta) tuples. This determines where the pen is. The stack is born with (0, 0, 0) on it
- Whenever we see an F, we move forward (whatever direction theta says) and change the top of the stack to reflect this
- Whenever we see a +, we turn left (we add something to theta)
- Whenever we see a -, we turn right (ad subtract something from theta)
- Whenever we see a [, we make a copy of the tuple at the top of the stack and we push
- Whenever we see a ], we pop the stack (we return to wherever we were when we saw the corresponding [)