[Math] Compute the Centroid of a 3D Planar Polygon

discrete geometrymg.metric-geometrypolygons

Given a list of 3D coordinates that define the surface( Point3D1, Point3D2, Point3D3, and so on), how to calculate the centroid of the surface?

More specifically, I am looking for a natural extension of the following 2D centroid algorithm in 3 or more dimension:

alt text
alt text

alt text

Any idea?

P/S: All the points are coplanar, this is the assumption.

Best Answer

In response to JBL's comment, I offer this answer merely to close out this topic. It has been effectively answered in the comments: Simply project to xy and to xz and compute the centroid there. (One tiny wrinkle not addressed is if the polygon lies in a plane perpendicular to xy or to xz. But then simply chose the coordinate planes in which it does not lie.)

On the advice of Andrew Stacey, I am designating this answer "community wiki," and hope that someone will vote it up so it will no longer be bumped to the top of the active list by the MO background process.

Related Question