Set hue=15 Do If random(100)=0 Set hue=random(15)+1 Call kaleido (hue) @ Call read quit key Loop //Peek-A-Boo!!! //There's more down here! Task kaleido (Int z) Common Int qsize, qpntr Common Int qx[5000], qy[5000] Common Int first=1, stepsize=5 If first qsize=5000 Do k=0,qsize-1 qx[k]=0 ; qy[k]=0 Loop k qpntr=0 first=0 Endif previndex=(qpntr-1+qsize)%qsize newx=qx[previndex]+random(2*stepsize+1)-stepsize newx=newx-random (newx+1)/175 If (newx <0) newx=0 If (newx>319) newx=319 newy=qy[previndex]+random(2*stepsize+1)-stepsize newy=newy-random (newy+1)/175 If (newy<0) newy=0 If (newy>319) newy=319 line color (0) oldindex=(qpntr+1)%qsize mirror (qx[oldindex], qy[oldindex], qx[qpntr], qy[qpntr]) @ line color (z) mirror (qx[previndex], qy[previndex], newx, newy) @ qx[qpntr]=newx qy[qpntr]=newy qpntr=oldindex End kaleido Task mirror (Int a, Int b, Int x, Int y) line (320+a, 240+b, 320+x, 240+y) line (319-a, 239-b, 319-x, 239-y) line (319-a, 240+b, 319-x, 240+y) line (320+a, 239-b, 320+x, 239-y) line (320+b, 240+a, 320+y, 240+x) line (319-b, 239-a, 319-y, 239-x) line (319-b, 240+a, 319-y, 240+x) line (320+b, 239-a, 320+y, 239-x) End mirror