Enter derivation rules

A derivation rule maps single characters to output strings

The starting string is called w. You must have exactly one derivation rule for w



Samples


Example

Example:

w -> F
F -> F+F

On the first iteration, we look up the rule for w. The output string is F

On the second iteration, we replace every F in the input string with F+F. The output string is F+F

On the third iteration, we replace every F in the input string with F+F. The output string is F+F+F+F

And so on...

After running n iterations, the output string is used as drawing instructions. The pen starts at the origin aiming north.

Further reading: Chapter 1 of The Algorithmic Beauty of Plants