Terrain Generator
by Neil Hayek


What you need:

First you need a heightmap.  This needs to be a square image with dimensions that are a power of 2.
It should be greyscale.  Black represents low elevation and white represents high elevation.
It is recommended to be a .raw file for quality.

Second you need a texture map.  This must have dimensions that are a power of 2 but it does not
have to be a square image. A .bmp is recommended.

Command line arguments:

HeightMap Texture stretch/tile MapSize StepSize HeightRatio ScaleFactor

First is the heightmap file with location if not in the same directory as the executable
Second is the texture file with location if not in the same directory as the executable
Third is if you want to sretch the texture map or want it tiled (mapped to each quadrilateral)
Fourth is the map size.  This should be a power of 2 that is the dimensions of the height map.
Fifth is the step size.  This affects the quality of terrain.  A smaller step size will draw
	more quadrilateral resulting in the generated terrain to more closely match the heightmap.
Sixth is the height ratio.  This affects how high you want the height of the terrain to be multiplied.
Seventh is a scale factor.  This affects the overall size of the generated terrain (X, Y, and Z values).

Viewing the terrain:

To rotate the camera, click and drag the mouse.  The camera will rotate in the direction you drag.

keys:

A - move left
D - move right
W - move forward
S - move backward


NOTE:
Based on the command line values, it is possible that when the program starts up, the camera isn't
facing the terrain.  This can be resolved with a camera rotation (likely downwards).