On the choice of a cost function for the reconstruction of surfaces by triangulation between contours