just make an array of random angles between nought and threesixty degrees, then rotate through them and multiply the sine of the result by the wave height, heres an example (made in pro, but should work in classic)
sync on:sync rate 40
make matrix 1,200,200,20,20
dim waves(20,20)
for i=0 to 20
for l=0 to 20
waves(i,l)=(rnd(72))*5
next l
next i
wave_height#=3.5
do
for i=0 to 20
for l=0 to 20
set matrix height 1,i,l,sin(waves(i,l))*wave_height#
rem diy wrapvalue since pro version fails after so long
if waves(i,l)<360
waves(i,l)=waves(i,l)+5
else
waves(i,l)=0
endif
next l
next i
update matrix 1
if upkey() and (wave_height#<20) then wave_height#=wave_height#+0.1
if downkey() and (wave_height#>0) then wave_height#=wave_height#-0.1
text 100,100,"Press up to increase waves and down to decrease"
text 0,0,"wave height:-"+str$(wave_height#)
sync
loop
Mentor.
PC1: P4 hyperthreading 3ghz, 1gig mem, 2x160gig hd`s, Nvidia FX5900 gfx, 6 way surround sound, PC2: AMD 1.2ghz, 512mb ram, FX5200 ultra gfx, stereo 16 bit soundblaster, ups.