View Full Version : unbiased center of a point cloud
02-18-2009, 01:33 AM
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.
02-18-2009, 02:49 AM
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..;)
02-18-2009, 03:58 AM
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.
02-18-2009, 01:37 PM
Sounds like a headache! Fortunately center of a bounding box is perfect for what i need!
02-18-2009, 01:37 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.