On 02/11/2013 12:17 PM, Andrey Savov wrote: > Was wondering if you guys can point me in the right direction. > > Are there any known/studied methods to calculate a centroid (geometric center) of finite set of points in n-dimensional real Euclidean space by only knowing a distance metric f(x,y): R^n x R^n -> R ?
Suppose the figure S can be enclosed in a box of volume V.
Then you can generate pseudo-random points in the box and when the point P falls inside S, do: ( count=0; xSum= ySum = zSum = 0 initially )
Then, xbar = xSum/count is ~= x-coordinate of the centroid of S, etc.
That's the Monte Carlo way.
A more advanced way is quasi-Monte Carlo methods, which rely on special sequences of points that are sort of quasi-periodic (modulo something): a Halton sequence, a Sobol sequence, or a Faure sequence, for example: