Basic Framework of Terrain Engine