100 PICTURE D(n)
110    IF n=n0 THEN 
120       set area color 2
130       PLOT AREA: 0,0 ; 2,0; 1,SQR(3)
140       set area color 5
150       PLOT AREA: 0,0 ; 2,0; 1,-SQR(3)
160    ELSE
170       DRAW D(n+1) WITH SCALE(1/SQR(3))*ROTATE(PI/6) 
180       DRAW D(n+1) WITH SHIFT(-2,0)*SCALE(1/SQR(3))*ROTATE(PI/6)*SHIFT(2,0)
190       DRAW D(n+1) WITH SHIFT(-1,-SQR(3))*SCALE(1/SQR(3))*ROTATE(PI/6)*SHIFT(1,SQR(3))
200    END IF
210 END PICTURE
220 SET WINDOW -1,4,-2,3
230 SET POINT STYLE 1
240 FOR n0=0 TO 8
250    SET DRAW MODE HIDDEN
260    CLEAR 
270    DRAW axes
280    DRAW D(0)
290    SET DRAW MODE EXPLICIT
300    WAIT DELAY 1  ! 1•b‹xŽ~
310 NEXT n0
320 END
