Moore curve

Moore curve

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
lsystem MooreCurve {
 
set symbols axiom = L F L + F + L F L;
set iterations = 5;
 
interpret F as DrawForward(8);
interpret + as TurnLeft(90);
interpret - as TurnLeft(-90);
 
rewrite L to - R F + L F L + F R -;
rewrite R to + L F - R F R - F L +;
}
 
process all with SvgRenderer;