Archived

This topic is now archived and is closed to further replies.

Center of a polygon

This topic is 6928 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Hi, I''m trying to find the center of a convex 3d polygon with n sides. How can I do this? One idea I had is to take every triangle in the polygon and find the center of each triangle by taking the intersection of the medians. Once I have the center of each triangle, I sum up all the centers and divide by the number of triangles to get the average, and that point is the center. My first question is, will this approach work? My second question is, how do I find the intersection of the medians? I know that I make two lines going from one vertex to the median of the opposite side, but how do I find the intersection of two 3d lines? Thanks in advance!! ----Blah

Share on other sites

http://www.psc.edu/~burkardt/geometry.html

Man, whoever wrote that is a life saver! The source code
is in fortran, which I have never used, but it is still
pretty easy to see what is going on.

I haven''t tested the code yet, but I bet it will work.
Sorry for posting the question guys, I guess I should have
looked around some more first. Well, back to
programming...

----Blah

• 11
• 10
• 13
• 57
• 11