|
![](/i/fill.gif) |
Does anyone know of a macro or include file to simulate waves on the
surface of a fluid? I don't want to reinvent the wheel.
I'm thinking of something like:
loop
Buffer2(x, y) = (Buffer1(x-1,y)
Buffer1(x+1,y)
Buffer1(x,y+1)
Buffer1(x,y-1)) / 2 - Buffer2(x,y)
Buffer2(x,y) = Buffer2(x,y) * damping
end loop
Taken from
http://freespace.virgin.net/hugo.elias/graphics/x_water.htm
I wrote something to do the job in QB but I am no programmer and
cannot get it to work with an array larger than 121 x 121.
Thanks Stephen
Post a reply to this message
|
![](/i/fill.gif) |