Compute the Centroid of a 3D Planar Polygon - MathOverflow most recent 30 from http://mathoverflow.net2013-05-21T17:18:51Zhttp://mathoverflow.net/feeds/question/17048http://www.creativecommons.org/licenses/by-nc/2.5/rdfhttp://mathoverflow.net/questions/17048/compute-the-centroid-of-a-3d-planar-polygonCompute the Centroid of a 3D Planar PolygonGraviton2010-03-04T03:07:39Z2011-11-07T17:53:48Z
<p>Given a list of 3D coordinates that define the surface( <code>Point3D1</code>, <code>Point3D2</code>, <code>Point3D3</code>, and so on), how to calculate the centroid of the surface?</p>
<p>More specifically, I am looking for a natural extension of the following <a href="http://en.wikipedia.org/wiki/Centroid#Centroid_of_polygon" rel="nofollow">2D centroid algorithm</a> in 3 or more dimension:</p>
<p><img src="http://upload.wikimedia.org/math/e/e/1/ee14cbb2b170c4bb435f1d84e78f6d66.png" alt="alt text">
<img src="http://upload.wikimedia.org/math/a/4/c/a4cee81a1d18e4d067f66d4d40a8a1fe.png" alt="alt text"></p>
<p><img src="http://upload.wikimedia.org/math/0/2/a/02aecb75f67f8c7b2fc11fdcbcb6ea80.png" alt="alt text"></p>
<p>Any idea?</p>
<p><strong>P/S: All the points are coplanar, this is the assumption.</strong> </p>
http://mathoverflow.net/questions/17048/compute-the-centroid-of-a-3d-planar-polygon/17118#17118Answer by Quimey Vivas for Compute the Centroid of a 3D Planar PolygonQuimey Vivas2010-03-04T18:35:39Z2010-03-04T18:35:39Z<p>These formulas could be deduced using <a href="http://en.wikipedia.org/wiki/Green_theorem" rel="nofollow"> Green's theorem </a>. For example the formula used to compute the polygon's area is proved using the vector field F=(-y/2,x/2).</p>
<p>Maybe you can do the same in the space using analogous vector fields and <a href="http://en.wikipedia.org/wiki/Stokes_theorem" rel="nofollow"> Stokes' theorem </a>.</p>
http://mathoverflow.net/questions/17048/compute-the-centroid-of-a-3d-planar-polygon/20536#20536Answer by Faken for Compute the Centroid of a 3D Planar PolygonFaken2010-04-06T19:07:26Z2010-04-06T19:07:26Z<p>I'm not sure about the centroid of the surface area, but I might be able to help with the centroid of it's enclosed volume under some specific circumstances.</p>
<p>If each surface formed by the points creates a triangle (as is the case with the vast majority of computer related applications) then you can use this method that i outlined in StackOverflow (i understand its not in the from a mathematician would like it in, but if you read the explanation the answer is fairly simple).</p>
<p><a href="http://stackoverflow.com/questions/2083771/a-method-to-calculate-the-centre-of-mass-from-a-stl-stereo-lithography-file">http://stackoverflow.com/questions/2083771/a-method-to-calculate-the-centre-of-mass-from-a-stl-stereo-lithography-file</a></p>
<p>Hopefully that helps</p>
http://mathoverflow.net/questions/17048/compute-the-centroid-of-a-3d-planar-polygon/28381#28381Answer by Joseph O'Rourke for Compute the Centroid of a 3D Planar PolygonJoseph O'Rourke2010-06-16T12:49:50Z2010-06-29T11:24:32Z<p>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.) </p>
<p>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.</p>
http://mathoverflow.net/questions/17048/compute-the-centroid-of-a-3d-planar-polygon/80318#80318Answer by unknown (yahoo) for Compute the Centroid of a 3D Planar Polygonunknown (yahoo)2011-11-07T17:53:48Z2011-11-07T17:53:48Z<p>Related to this topic: what if the points do not lie all in the same plane ?
I need to calculate the center of an hexagon. However, the hexagon in not planar (it is a 3D object, a distorted hexagon). Can the above formulas be exended to calculate the centroid of this hexagon ? </p>