Surface Mesh Generation for Voxel-Based Objects by Energy Minimization