Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README.md
Terrain.cpp
makefile
terrainPic0.png
terrainPic1.png
terrainPic2.png
terrainPic3.png
terrainPic4.png

README.md

Terrain Generator Program

Random terrains are generated with OpenGL/GLUT and C++ using a couple of algorithms. The default option is the circles algorithm, which can be learned about here http://www.lighthouse3d.com/opengl/terrain/index.php?circles

Another option is the fault algorithm, which can be learned about here http://www.lighthouse3d.com/opengl/terrain/index.php?fault

The following code snippet displays all of the options available in this program:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                      Commands
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Left and right arrow keys rotate about the y axis
Up and down arrow keys to rotate about the x axis
'1' & '2' change position of first light
'9' & '0' change position of second light
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'w' --> toggles the wireframe mode
'L' --> toggles the lighting in the scene
's' --> toggles between flat and Gouraud shading
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'c' --> generates terrain using circles algorithm
'f' --> generates terrain using fault algorithm
'r' --> generates new random terrain with random colour
'h' --> generates hypsometric tint (or topography map)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
't' --> draws terrain using triangles
'y' --> draws terrain using quads

'R' --> resets terrain back to the beginning
Right clicking brings up terrain size menu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

These are a few pictures of some terrains the program has generated:

ScreenShot

ScreenShot

ScreenShot

ScreenShot

ScreenShot

Ideas to continue with this project include adding a character which can be moved on the terrain.

You can’t perform that action at this time.