CLEAR ALL
num=25
BITMAP 1 NEW 640,400:SHADER 1 LOAD "GeodesicTiling.fs"
DIM x(num),y(num)
DIM xs(num),ys(num)
FOR i=1 TO num
    x(i)=RANGE(0,1279)
    y(i)=RANGE(0,799)
    xs(i)=RANGE(3,5)
    ys(i)=RANGE(3,5)
    SPRITE i BIND BITMAP 1 SET SHADER 1
    s=RANGE(4,8)/12
    SPRITE i SHOW MOVE x(i),y(i) SCALE s,s ROTATE RANGE(0,359)
NEXT i
DO
    BACKGROUND PLASMA.COLOR
    FOR i=1 TO num
        x(i)=x(i)+xs(i)
        y(i)=y(i)+ys(i)
        IF x(i)<0 OR x(i)>=1280 THEN xs(i)=-xs(i)
        IF y(i)<0 OR y(i)>=800 THEN ys(i)=-ys(i)
        SPRITE i MOVE x(i),y(i) ROTATE (SPRITE.ROTATION(i)+1) MOD 360
    NEXT i
    PAUSE
LOOP WHILE INKEY$=""
