Centroid of a 3D polygon? Or 3D-to-2D coordinate conversion?
843799Nov 25 2007 — edited Nov 26 2007Hi,
I need one of two questions answered, preferably the first one.
1. There are formulas all over the Web for how to calculate the centroid of a polygon. However, these are all in terms of 2D coordinates. Is there any simple formula for the centroid of a polygon when the points are 3D (and the polygon is part of an arbitrary plane, not necessarily orthogonal to any of the axes)?
2. If that doesn't work, does anyone know a good way to perform the necessary coordinate conversion? I assume what I need to do is convert my polygon's coordinates to 2D, find the centroid, then backtrack and convert the centroid back to the old coordinate system. All the points on the polygon are guaranteed to be coplanar.
Any help either way would be great.
Thanks,
-Mike