CONST COUNT=33
CLEAR ALL
SCREEN BITMAP 256,256
DIM x(1,COUNT-1)
DIM y(1,COUNT-1)
x(0,0)=150
y(0,0)=100
x(1,0)=170
y(1,0)=100
alt=0
DO
    FOR z=0 TO COUNT-1
        INK 0
        LINE x(0,z),y(0,z),x(1,z),y(1,z)
        FOR i=0 TO 1
            DO
                x(i,z)=ABS(x(i,alt)+RANGE(0,50)-25)
            LOOP WHILE x(i,z)>256
            DO
                y(i,z)=ABS(y(i,alt)+RANGE(0,50)-25)
            LOOP WHILE y(i,z)>256
        NEXT i
        INK RND.COLOR
        LINE x(0,z),y(0,z),x(1,z),y(1,z)
        alt=z
        PAUSE
    NEXT z
LOOP WHILE INKEY$=""
