1

There is a closed plane region whose boundary is defined by an implicit function f(x,y)=0. It is not possible to write y as an explicit function of x, nor is it for an explicit relation in polar coordinates. Is there a way of calculating the center of mass of this plane region, given a uniform density distribution?

feynman
  • 188
  • 9

1 Answers1

1

You can find a parametrisation $(x(t),y(t))$ of the region's boundary by

  • starting at any point on the boundary, found by any decent root-finding algorithm applied along an appropriate line in the $xy$-plane
  • using marching squares to then trace the rest of the region out. (This method is in fact how maths software like Mathematica, matplotlib and Desmos draw contours in contour plots.)

Once you have this parametrisation you can compute the centroid using Green's theorem with a suitable integrand.

Parcly Taxel
  • 105,904
  • thanks! But what if the parametrisation isn't possible? – feynman Feb 26 '23 at 04:08
  • Thanks so much. But is the marching squares approach able to solve this problem when the curve is is implicitly defined? How? – feynman Feb 26 '23 at 09:04
  • the curve is differentiable but implicit. Then how should I use your approach of 'starting at a point on the boundary and going perpendicular to the gradient'? – feynman Feb 26 '23 at 10:19
  • @feynman OK, marching squares is in fact a very useful method for finding the boundary. See the latest edit! – Parcly Taxel Feb 26 '23 at 10:29