Suppose that I have a set of points E which belong to a manifold. Typically a surface mesh like that. $$E=\{x_{0},x_1,...,x_n\}$$ where the $x_i$ are the points coordinates in 3D such that : $x_i = (x_{i}^x,x_{i}^y,x_{i}^z)$
I would like to compute the centroid $c$ such that it's coordinates are the mean of the coordinates of all the points belonging to this manifold. But I don't want the metric to be the Euclidian distance (because the centroid will not be necessarily on the manifold).
Any help will be appreciated.