To produce pictures from L-systems, we need some method of
translating the strings into drawing
instructions. A common aplhabet is
+ | Turn counterclockwise by a specified angle q |
- | Turn clockwise by a specified angle q |
F | Move forward one step while drawing a line |
f | Move forward one step without drawing a line |
Here is an example of an L-system generating the Koch curve.
Here is an example of an L-system generating the Cantor middle-thirds set.
Exercise Find an L-System to generate the Cantor set formed by removing the middle half.
When generating fractal images, to keep the picture from becoming too large we adopt the convention of rescaling the length of the line segments so each step occupies about the same size space.
The alphabet need not consist of symbols that involve drawing, moving, and turing. Other symbols can be introduced to allow different substitutions at different parts of a string. Here is an example.
Here is some software to explore l-systems.
Return to L-Systems.