DECLARE EXTERNAL PICTURE CCurve
SET WINDOW -0.5,1.5,-0.5,1.5
LET n=10
DRAW CCurve(n)
END
EXTERNAL PICTURE CCurve(n)
IF n=0 THEN  
   PLOT LINES: 0,0; 1,0
ELSE
   DRAW CCurve(n-1) WITH SCALE(SQR(1/2))*ROTATE(PI/4)
   DRAW CCurve(n-1) WITH SCALE(SQR(1/2))*ROTATE(-PI/4)*SHIFT(1/2,1/2)
END IF
END PICTURE

