...or perhaps you're looking for something like this:
sync on : sync rate 40
make matrix 1,1000,1000,20,20
position camera 500,300,0 : point camera 500,0,500
do
MakeWaves(1,20,20,35,1,ang#) : ang# = wrapvalue(ang# + 2.0)
sync
loop
function MakeWaves(mat,xsize,zsize,height#,freq#,a#)
s# = (height# / 10)+1
for z = 0 to zsize
for x = 0 to xsize
set matrix height mat,x,z,sin(a#+(x*s#))*height#
a# = a# + freq#
next x
next z
update matrix mat
endfunction
Programming anything is an art, and you can't rush art.
Unless your name is Bob Ross, then you can do it in thirty minutes.