Lunch time coding...

Miscellaneous Forums/Blitz Showcase/Lunch time coding...

Graphics3D 640,480,0,2

size=128

mesh=CreateTerrain(size)
PositionEntity mesh,-size/2,0,-size/2
TerrainShading mesh,True
EntityShininess mesh,1
ScaleEntity mesh,1,50,1
TerrainDetail mesh,10000

camera=CreateCamera()
light=CreateLight(2)
PositionEntity light,2000,2000,-100

pivot=CreatePivot()
MoveEntity camera,0,size,-size
EntityParent camera,pivot
PointEntity camera,pivot

hsize=size/2
offset#=0

frequency#=0.6
speed#=10

Repeat

TurnEntity pivot,0,1,0

For x=0 To (size/2)-1
For y=0 To (size/2)-1
i=((size/2)-(Sqr((x*x)+(y*y))))*7

h#=(Sin((i*frequency)+offset)/2)+.5

	ModifyTerrain mesh,x+hsize,y+hsize,h
	ModifyTerrain mesh,hsize-x,y+hsize,h
	ModifyTerrain mesh,x+hsize,hsize-y,h
	ModifyTerrain mesh,hsize-x,hsize-y,h

Next
Next

offset=offset+speed

UpdateWorld
RenderWorld
Flip

Until KeyHit(1)