DrawScript

home.gif


Beach Ball


A very elementary animation with only three frames (based on the colour-switching techniques from the old BBC micro)

beach.gif

PROCChooseColours
FOR i=1 TO 3
 PROCSwapColours
 PROCBeachBall(5,5,4,c%()) : ·SaveDrawing("beach"+STR$i)
NEXT
END

DEF PROCBeachBall(x,y,r,c%())
·Fill(c%(0)) : ·Ellipse(x,y,r,r)
·Fill(c%(1)) : ·Ellipse(x,y,r*0.9,r)
·Fill(c%(2)) : ·Ellipse(x,y,r*0.8,r)
·Fill(c%(0)) : ·Ellipse(x,y,r*0.7,r)
·Fill(c%(1)) : ·Ellipse(x,y,r*0.6,r)
·Fill(c%(2)) : ·Ellipse(x,y,r*0.5,r)
·Fill(c%(0)) : ·Ellipse(x,y,r*0.4,r)
·Fill(c%(1)) : ·Ellipse(x,y,r*0.255,r)
·Fill(c%(2)) : ·Ellipse(x,y,r*0.1,r)

ENDPROC

DEF PROCChooseColours
DIM c%(2)
c%(0)=&EEEE00 : REM yellow
c%(1)=&FF00 : REM Red
c%(2)=&FFBB0000 : REM Blue
ENDPROC

DEF PROCSwapColours
LOCAL a%
a%=c%(0) : c%(0)=c%(1) : c%(1)=c%(2) : c%(2)=a%
ENDPROC