Generate terrains either randomly or from image-based heightmaps for use with the Three.js 3D graphics library for the web.