#!/usr/local/bin/ised --f @0{0 1 0 2 0 2 0 1 0}; #! F to F+F-F-F+F @1{1}; #! + to + @2{2}; #! - to - @10{$$$$$$0}; #! 6 iterations of the system, starting with F ($0) #! $10 is already the result we wanted. #! However, to draw the curve, we must simulate turtle graphics @11{ {0 1 -1}_$10 }; #! F means forward, + means left (1=90 degrees), - means right (-1=-90 degrees) @12(0 $11 -1); #! cumulative of angle changes gives absolute orientations #! x cumulative: {1 0 -1 0} are x increments for each of the 4 possible directions @13(0 {1 0 -1 0}_$12 -1); #! cyclic nature of _ operator automatically maps the absolute orientations to interval [0 3] #! y cumulative: {0 1 0 -1} are y increments for each of the 4 possible directions @14(0 {0 1 0 -1}_$12 -1); --t '$13;$14' #! output the result