Isaac Barry

2022-09-03

Centroid of contiguous polygons
Say that I know which are the centroids of two polygons. These polygons share a number of edges (they belong to a planar subdivision). I want to compute the union of the two polygons and also to know the centroid of the new polygon which covers the other two. I know I could recompute the centroid taking the points of the new polygon. But, is there a way to obtain the centroid by knowing the other centroids, without the need for recomputing everything from scratch?

falwsay

Step 1
If, when you computed the centroids, you also computed the polygon areas, then the answer is yes. The new centroid is ${c}_{\text{new}}=\frac{{A}_{1}}{{A}_{1}+{A}_{2}}{c}_{1}+\frac{{A}_{2}}{{A}_{1}+{A}_{2}}{c}_{2},$, where the ${A}_{i}$ are the areas and the ${c}_{i}$ are the centroid points.
Step 2
By the way, you can also compute the new area with the update rule ${A}_{\text{new}}={A}_{1}+{A}_{2}.$.
I know that's silly, but if you're hoping to proceed inductively, it's actually pretty useful.
By the way, the two polygons under consideration need not be adjacent. On the other hand, they must not overlap, unless you're willing to consider the overlap area as counted twice.

Do you have a similar question?