[Math] Finding centroid of a polygon with holes

centroidgeometrypolygons

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

Best Answer

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}}$$

Related Question