A chopped up version of some older code written in DBP, but I think it'll work in classic. I had a more thorough example somewhere. (and it was written in classic)
randomize timer()
for y=1 to 128
for x=1 to 128
dot x,y,rgb(0,rnd(128),rnd(128)+128)
next x
next y
get image 1,1,1,128,128
sync on
sync rate 60
autocam off
hide mouse
color backdrop 0
make matrix 1, 2000, 2000, 36,36
prepare matrix texture 1, 1, 1, 1
update matrix 1
rem footprint
make object plain 999,30,30
xrotate object 999,270
fix object pivot 999
DO
rem Control matrix like water(from DBP help file)
ma#=wrapvalue(ma#+1)
for z=0 to 36
for x=0 to 36
x#=cos(ma#+(x*30))
y#=sin(ma#+(z*30))
nx#=0.0-(cos(ma#+(x*10))*0.25)
nz#=0.0-(sin(ma#+(z*10))*0.25)
ny#=1.0-nx#-nz#
set matrix height 1,x,z,(x#+y#)*15.0
set matrix normal 1,x,z,nx#,ny#,nz#
next x
next z
update matrix 1
gosub camera_stuff
make_footprint(1,cx#,cz#)
sync
LOOP
REM ==========================================================================
REM Parameters:
REM matrix number
REM X coordinate
REM Z coordinate
function make_footprint(number as integer, x# as float, z# as float)
h1# = get ground height(number, x#, z#)
h2# = get ground height(number, x#+2, z#)
a# = h2# - h1#
b# = 2
angz# = atan(a#/b#)
h2# = get ground height(number, x#, z#+2)
a# = h2# - h1#
angx# = 360 - atan(a#/b#)
position object 999, x#, h1#+0.5, z#
rotate object 999,angx#,0,angz#
endfunction
camera_stuff:
oldcx#=cx#
oldcz#=cz#
speed# = 5
if shiftkey() then speed# = 10
if upkey()=1
cx#=newxvalue(cx#,a#,speed#)
cz#=newzvalue(cz#,a#,speed#)
endif
if downkey()=1
cx#=newxvalue(cx#,a#,-speed#)
cz#=newzvalue(cz#,a#,-speed#)
endif
if leftkey()=1
dec a#, 4
endif
if rightkey()=1
inc a#, 4
endif
cy# = get ground height(1,cx#,cz#)
position camera newxvalue(cx#,a#,-100),cy#+50,newzvalue(cz#,a#,-100)
point camera cx#,cy#,cz#
`rotate camera wrapvalue(cxa#),a#,0
RETURN
Deadly Night Assassins