Finding centroid of a polygon with holes

3.1k Views Asked by At

I am able to find the centroid of a polygon without holes. How can I find the centroid of a polygon with holes?

1

There are 1 best solutions below

3
On

If you know the area of the polygons, you can use the weighted average of the containing and internal polygon centroids. Specifically, if the two polygons have areas $A_{out}$ and $A_{in}$, and centroids $\bf r_{out}$ and $\bf r_{in}$, the centroid of the polygon "doughnut" will be: $$\frac{A_{out}{\bf r_{out}} - A_{in}{\bf r_{in}}}{A_{out}-A_{in}}$$