REM Peano Curve
OPTION ANGLE DEGREES
PICTURE Peano(n)
   IF n=0 THEN
      PLOT POINTS: 0,0
   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
SET POINT STYLE 1
DRAW Peano(12)
END
