Simple Landscape
This demo just randomly creates terrian and with a gently tide. To build this terrain I use various intersection and circle iteration methods.
Basic Intersection Idea:
- Draw a line across the terrain so it is split into two halves.
- Now raise one half and lower the other half.
- Do this 1000 times and you’ll get a jagged surface.
Basic Circle Method:
- Pick a point and a radius on the terrain.
- Raise the terrain out in a bubble shape to match its radius
- Do this 100 times and you’ll get a nice mountain
Now you want to smooth out the terrain to give it a realistic feel. Just remember that this isn’t suitable, as it stands, for any games. For a game you might want not want to process height data on the fly (use a hightmap instead).
Downloads
- file:
Landscape.zip [428.01kb]
Category: OpenGL
download: 746 - file:
Landscapesrc.zip [408.59kb]
Category: OpenGL
download: 636
Click here for a other articles in the opengl section.
Walter Reid