ok, heres the code:
this bit creates the matrix and loads the heightmap
getheightbmp("land.bmp")
landsize=10000
xtiles=70
ztiles=70
make matrix 1,landsize,landsize,xtiles,ztiles
load bitmap "Landtex.bmp",1
get image 1,0,0,256,256
delete bitmap 1
prepare matrix texture 1,1,2,2
fill matrix 1,0.0,1
this bit sets the heights (the function that get data from the heightmap comes later)
for x=1 to xtiles
for z=1 to ztiles
set matrix height 1,x,z,hmap(x,z)*3
next z
next x
lighting (got this from a DB example)
`normalise matrix
for z=1 to xtiles-1
for x=1 to ztiles-1
` Get matrix heights
h8#=get matrix height(1,x,z-1)
h4#=get matrix height(1,x-1,z)
h#=get matrix height(1,x,z)
h2#=get matrix height(1,x,z)
`Calculate projected angle X using heights
x1#=(x-1)*25.0 : y1#=h#
x2#=(x+0)*25.0 : y2#=h4#
dx#=x2#-x1#
dy#=y2#-y1#
ax#=atanfull(dx#,dy#)
ax#=wrapvalue(90-ax#)
`Calculate projected angle Z using heights
z1#=(z-1)*25.0 : y1#=h2#
z2#=(z+0)*25.0 : y2#=h8#
dz#=z2#-z1#
dy#=y2#-y1#
az#=atanfull(dz#,dy#)
az#=wrapvalue(90-az#)
`Make normal from projected angle
nx#=sin(ax#)
ny#=cos(ax#)
nz#=sin(az#)
`edit positions
nox#=nx#*25000
noy#=ny#*9000
noz#=nz#*1000
`Setting matrix normal for smoothness
set matrix normal 1,x,z,nox#,noy#,noz#
next x
next z
`set matrix's visual properties
set matrix 1,1,1,1,1,1,1,1
`update the matrix
update matrix 1
now the function after the main loop
`get the heightmap
function getheightbmp(file$)
`open file
open to read 1,file$
`--------------------
`decode
read byte 1,notusefull
read byte 1,notusefull
read long 1,notusefull
read long 1,notusefull
read long 1,notusefull
read long 1,notusefull
`--------------------
`Get Bitmap Width
read long 1,BmpWidth
`Get Bitmap Height
read long 1,BmpHeight
`--------------------
read word 1,notusefull
`--------------------
`Get BitDepth
read word 1,BitDepth
`--------------------
`The info contained here is not usefull.
read long 1,notusefull
read long 1,notusefull
read long 1,notusefull
read long 1,notusefull
read long 1,notusefull
read long 1,notusefull
`--------------------
`error check only if bitdepth=24
if BitDepth=24
ypos=BmpHeight
`Calculate If bmp required Padding
bmpwidth#=bmpwidth
evenwidth1#=(BmpWidth#*3)/4
evenwidth2=(BmpWidth*3)/4
padlen=0
if evenwidth1#<>evenwidth2
evenwidth1#=evenwidth1#-evenwidth2
padlen=4-(evenwidth1#*4)
endif
`-------------------------------------------
`create the hmap array
dim hmap(bmpwidth,bmpheight)
`-------------------------------------------
`Get color info
For Ylp=1 to BmpHeight
for Xlp=1 to Bmpwidth
`Read color values
read byte 1,blue
read byte 1,Green
read byte 1,red
`enter color info into height array
hmap(xlp,ypos)=(blue+green+red)/3
next Xlp
dec Ypos
`Padding
if padlen<>0
for padlp=1 to padlen
read byte 1,padbyte
next padlp
endif
next Ylp
endif
`close the file
close file 1
`end current function
endfunction
P.S. Your best making the function a different dba file and just including it...oh and if you wanna see the lighting keep the ambient light bellow 100
if you want some code to texture the matrix at different heights just ask
Edit: if you dont have a heightmap heres one just to start you off with (im assuming you have textures too

)
"Well, if he dies, it'll teach him not to do it again." - Me