Is the center of mass of a convex shape can be calculate just by its sphere?

182 Views Asked by At

I want to calculate the center of mass of a convex shape with finite number of points (it is actually pixels in a picture this is why it is discrete).

Let say the shape is convex (it is not but pretty close to it so we can let go of extreme cases).

Can I calculate the mean value of the sphere points (points that are on the border of the shape, they have neighbors which are not part of the shape) instead of using all the points?

It will reduce my time complexity significantly.

It feels like it can work but I don't know how to prove it.

Thanks a lot!

EDIT: Ok now my guts changed: if you take A long and narrow isosceles triangle, the mass point of the sphere would be pretty close to the middle, where the mass point of the whole shape is probably third way from the base if I am not wrong.

1

There are 1 best solutions below

3
On

The center of mass of border points is different, in general, from that of the whole shape.

You could instead divide your shape into "simple" pieces (for instance rectangles and triangles) for which it is easy to compute the center of mass. The overall center of mass is then the average of the positions of the centres of the pieces, weighted by the areas of the pieces.