Look at Red_eye's code! The 'update matrix' is inside the for-next loop.
So it updates 100 TIMES. If you write it before sync it will update only once.
That's WAY faster.
Better and faster version:
rem Settings
speed# = 5
height# = 2
xfreq# = 20
yfreq# = 20
camspeed# = 0.5
sync on
sync rate 40
Make matrix 1, 50, 50, 20, 20
position matrix 1, -25, 0, -25
Do
rem do camera
position camera 50.0 * sin(camangle#), 20.0, 50.0 * cos(camangle#)
point camera 0, 0, 0
camangle# = camangle# + camspeed#
rem control waves
for x=0 to 20
for y=0 to 20
set matrix height 1, x, y, sin( y*yfreq# + x*xfreq# + pos#) * height#
next y
next x
pos# = wrapvalue(pos# + speed#)
update matrix 1
sync
Loop