Title: Terrain Generation
Author: Nathan Cournia
Description: A simple interactive terrain generator.
Institution: Clemson University
Class: CPSC805 - Advanced Computer Graphics
Language: C++
Construction Time: About 1 Day
Date Completed: April 23, 2002


A simple terrain generator. The program is created with OpenGL, GTK+ and Glade. I was surprised how little time it took to get this thing done (about 1 day). The images on this page aren't very exciting and don't really show how the program works. Download the code and have a blast.


I implemeneted several different terrain generation algorithms for this assignment. Below you'll find a short discription of each algorithm. In addition to terrain generation algorithms, I implemented erosion using a simple FIR (Finite Impulse Response) filter.

Here are some notes about various aspects of the terrain generator:

Height Map:
I wanted to make sure my OpenGL code worked, so I quickly implemented height maps. These things are very simple. Simply read in a grey scale image and use each pixel value for a height.



Midpoint Displacement:
This is simple fractal algorithm where the midpoint of two vertices is displaced by a random amount.



Fault Formation:
In this algorithm a random line is drawn through the terrain. All terrain on one side of the line is randomly move either up or down. Over many iterations, this algorithm produces nice results.



Options:
I wanted to give the user some options to play around with so he can see how the algorithms work. As a result, every paramenter to every algorithm has a GUI counterpart. I also added GUI code to allow the user to play with the colors in the viewing environment.



Compiling:
Just type:

make

To run the program type:

./tgen


Source Code: cournia_terrain-20020422.tar.gz (19k)