FN.DEF curvaC(n,c) GLOBALS.FNIMP x1,y1,x2,y2,t IF n=1 THEN GR.LINE ln, x1,y1, x2,y2 LET x1=x2 LET y1=y2 ELSE curvaC(n-1,c) IF c=1 THEN LET y2+=t curvaC(n-1,2) ELSEIF c=2 THEN LET x2-=t curvaC(n-1,3) ELSEIF c=3 THEN LET y2-=t curvaC(n-1,4) ELSE LET x2+=t curvaC(n-1,1) ENDIF ENDIF FN.END WAKELOCK 3 GR.OPEN 255,0,0,0,0,1 GR.SCREEN sw,sh LET sx=sw/2 LET sy=sh/2 LET ncal=0 LET l=1 DO GR.COLOR 255,0,255,0 GR.TEXT.ALIGN 2 GR.TEXT.SIZE sy/14 GR.TEXT.DRAW txt,sx,sy/10,"TOUCH TO DRAW, LEVEL: "+INT$(++l) GR.RENDER DO GR.TOUCH tch, tx,ty PAUSE 50 UNTIL tch GR.HIDE txt GR.RENDER GR.CLS GR.COLOR 255,128+RND()*128,128+RND()*128,128+RND()*128 LET t=INT(sx/(1.4^l)) IF t<1 THEN LET t=1 LET x1=sx LET y1=sy LET x2=x1+t LET y2=y1 CALL curvaC(l,1) !GR.RENDER DO GR.TOUCH tch, tx,ty UNTIL !tch UNTIL 0