Notifications
Clear all

[Closed] unbiased center of a point cloud

I’ve been calculating the center of a vertex array by adding their positions and dividing by their total. This works fine, but will give biased results towards denser areas of points.

I’m looking for an alternative methods for finding center points which aren’t weighted.

Thanks

3 Replies

I think I’ve got something… if I check the pos of each vert, then take the maximum and minimum in each axis and average those, I’ll get something nearer what I want… I think…

Wouldn’t that be the same as taking the center of the bounding box of the point cloud?

That tends to be incorrect in a different manner. It’s a bit difficult to get what you want without defining it, though. The ‘center’ of an arbitrarily-shaped object (worse, point cloud) can be anything from the bounding box center to the center of mass (see the Measure utility) to a surface meshed-center of mass (there’s volumes of papers on surface meshing point clouds – metaballs would be the cheap way to get an approximation) to… etc.

One annoying such problem was in a geometry class once (in 2D, just pencil and paper and conceptualizing, no hard math there) was a ‘U’ shape with two thickish blobs at each end of the U and a slightly thicker bend than the thickness of the two vertical parts (below the ‘blobs), and we had to find various centers.
There’s the bounding rectangle center, center of mass (near the bend), the size-reduced centers (simply reducing the outline by a constant offset, leaving you with one center at each end and another one in the bend), the shrunk center (i.e. if the shape must stay whole without pinching) which nobody got quite right and probably a few more simplistic ones that didn’t stick with me.

Sounds like a headache! Fortunately center of a bounding box is perfect for what i need!