ok, that failed, lets try again:
sync on : sync rate 20
dim grid(50,50)
for x = 1 to 50
y = 50
g = (rnd(50))+100
b = (rnd(50))+100
ink rgb(r,g,b),1
col = rgb(r,g,b)
grid(x,y)=col
next x
do
gosub warpus
gosub array
sync
loop
warpus:
for x = 1 to 50
y = 50
g = (rnd(150))+100
b = (rnd(150))+100
ink rgb(r,g,b),1
col = rgb(r,g,b)
grid(x,y)=col
next x
return
array:
for x = 1 to 50
for y = 2 to 50
refx = x
refy = y
rem extract colours
col = grid(x,y)
green = rgbg(col)
blue = rgbb(col)
rem smooth it baby!!!!
if x > 1 then col2 = grid(x-1,y)
green2 = rgbg(col2)
blue2 = rgbb(col2)
if green2 > (green + 5) then green2 = green2 - 5
if green2 > (green + 5) then green2 = green2 - 5
if blue2 < (blue - 5) then green2 = green2 + 5
if blue2 < (blue - 5) then blue2 = blue2 + 5
change = RGB(r,green2,blue2)
grid(x,y)= change
rem alter colours
if green + rnd(20) > blue then ngreen = green - rnd(7)
if blue + rnd(20) > green then nblue = blue - rnd(7)
if ngreen < 1 then ngreen = 1
if nblue < 1 then nblue = 1
if ngreen > 100 then ngreen = ngreen - 7
if nblue > 100 then nblue = nblue - 7
rem mix up
mix = rnd(3)
if mix = 1 AND refx > 2 then refx = refx - 1
if mix = 2 AND refx < 48 then refx = refx + 1
ymix = rnd(3)
if ymix = 1 AND refy > 0 then refy = refy - 1
if ymix = 2 AND refy < 50 then refy = refy + 1
rem update array and draw on screen
ncol = RGB(r,ngreen,nblue)
ink rgb(0,ngreen,nblue),1
box refx*4,refy*4,(refx*4)+4,(refy*4)+4
grid(refx,refy-1)=ncol
next y
next x
return