http://math.uaa.alaska.edu/~dekokerj/terrain_tutorial.html