! Peano curve
OPTION ANGLE DEGREES
PICTURE Peano(n),NoBeamOff
   IF n=1 THEN
      PLOT LINES: 0.5,0.2; 1.5,0.2 ;
      WAIT DELAY 0.01    
   ELSE
      DRAW Peano(n-1) WITH SCALE(1/2)   
      DRAW Peano(n-1) WITH SCALE(1/2)*ROTATE(90)*SHIFT(1,0)
      DRAW Peano(n-1) WITH SCALE(1/2)*ROTATE(-90)*SHIFT(1,1)
      DRAW Peano(n-1) WITH SCALE(1/2)*SHIFT(1,0)
   END IF   
END PICTURE
SET WINDOW 0,2,0,2
DRAW Peano(5)
END
