This is a tool for experimenting with Lindenmayer Systems, or L-Systems.
Or copy the text below:
Below, you can paste the string you got from exporting an L-system.
An L-System is a parallel rewriting system and a type of formal grammar.
An L-System consists of an alphabet, a set of rewrite rules and an initial axiom, which is the string on which the first iteration of replacements is applied.
Example:
Start: | A |
Rules: | A > BAB |
After 0 iterations, this will result in the string A
.
After one iteration, it will be BAB
, then BBABB
, then BBBABBB
, and so on.
As you see, symbols for which there is no rule defined will remain constant.
Based on the system you define, a graphic will be drawn on the screen.
This follows simple rules:
Symbol | Result |
---|---|
A-L |
Draw straight line of length defined by Distance |
M-Z |
Jump forward by Distance without drawing |
a-z |
Do nothing: These symbols are only used in the replacement phase |
+ or - |
Turn by positive or negative Angle |
. |
Invert the meaning of + and - |
[ or ] |
[ will save the current angle and position for later,when ] will restore them.
|