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

