Drawing 3D terrain using a generated heightmap