Dragon curve
by NightElfik
Short link: http://malsys.cz/g/9PFuoJME
Comments
comments powered by DisqusSource code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | lsystem DragonCurve { set symbols axiom = L; set iterations = 12; set continuousColoring = true; // normalize line length (result image will have always same size) interpret R L as DrawForward(2 ^ -(currentIteration / 2) * 512); interpret + as TurnLeft(90); interpret - as TurnLeft(-90); rewrite L to L + R +; rewrite R to - L - R; } process all with SvgRenderer; |