#!/usr/local/bin/ised --f @0{1 3 0 3 1}; #! A to B-A-B @1{0 2 1 2 0}; #! B to A+B+A @2{2}; #! + to + @3{3}; #! - to - @10{$$$$$$$$0}; #! 8 iterations of the system, starting with A ($0) #! $10 is already the result we wanted. #! However, to draw the curve, we must simulate turtle graphics @11{ {0 0 1 -1}_$10 }; #! A and B mean forward, + means left (1=90 degrees), - means right (-1=-90 degrees) @12(0 $11 -1); #! cumulative of angle changes gives absolute orientations #! now directions [0 5] (plus any integer multiple of 6) represent 6 directions in space #! cumulative x and y coordinates @13(0 {1 0.5 -0.5 -1 -0.5 0.5}_$12 -1); #! note the x components of hexagon @14(0 {0 sqt3/2*{1 1} 0 -sqt3/2*{1 1}}_$12 -1); #! note the y components of hexagon --t '$13;$14'