Better implementation for midpoint displacement terrain.