Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Centroid of a 3D polygon? Or 3D-to-2D coordinate conversion?

843799Nov 25 2007 — edited Nov 26 2007
Hi,

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 24 2007
Added on Nov 25 2007
1 comment
547 views