randomize; graphon Do seed=random(32767) seed(seed); paint (320, 240, 1) @ seed(seed); paint (320, 240, 0) @ Loop Task paint (Int a, Int b, Int c) Common Int xq[250], yq[250], in, out, flag xq[0]=a; yq[0]=b; in=1; out=0; flag=0 Do If (in=out) Break x=xq[out]; y=yq[out] out=(out+1)%250 test (x-1, y, c) @ test (x+1, y, c) @ test (x, y-1, c) @ test (x, y+1, c) @ Loop delay (3*flag) Task test (Int x, Int y, Int z) Common Int xq[250], yq[250], in, out, flag Common Int hue[]={4,12,14,10,9,5} Common Int2 ndx=0 If (x<0 Or y<0 Or x>639 Or y>479) Return pix=getpixel(x, y) If ((z And pix) Or (!z And !pix)) Return ndx=(ndx+1)%90000L If ((ndx%5000)=0) read quitkey (27) If (z) putpixel (x, y, hue[ndx/15000]) Else putpixel (x, y, 0) If (random(100)<39) Return If out!=(in+1)%250 xq[in]=x; yq[in]=y If (!in) flag=flag+1 in=(in+1)%250 Endif