Penrose tiling
by NightElfik
Short link: http://malsys.cz/g/7qe7iF9P
Comments
comments powered by DisqusSource code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | lsystem PenroseTiling extends StdLsystem { set symbols axiom = [N] + + [N] + + [N] + + [N] + + [N]; set iterations = 5; set reversePolygonOrder = true; let darkClr = #221166; // dark blue let lightClr = #FFCC66; // dark yellow // normalize move length (result image will have always same size) interpret M N O P as MoveForward(2 ^ -(currentIteration / 2) * 200); interpret + as TurnLeft(36); interpret - as TurnLeft(-36); rewrite M to O + + <(darkClr, 2, #0) . P . - - - - N . [ - O . - - - - M . > ] + +; rewrite N to + <(lightClr, 2, #0) . O . - - P . [ - - - M . - - N . > ] +; rewrite O to - <(lightClr, 2, #0) . M . + + N . [ + + + O . + + P . > ] -; rewrite P to - - <(darkClr, 2, #0) . O . + + + + M . [ + P . + + + + N . > ] - - N; } process all with SvgRenderer; |
Thumbnail extension
1 2 | process all with SvgRenderer set iterations = 4; |