Advertisement

Finding the center of a polygon?

Started by October 05, 2002 07:13 PM
2 comments, last by MetaKnight 22 years, 4 months ago
How would i find the center of a polygon with three points? sorry this is really simple, i just cant seem to find it anywhere
Take the average of its three "vectors"?

C.x = (float)(v1.x + v2.x + v3.x) / 3.0f;
the same for y and z.
Advertisement
(x1 + x2 + ... + xn) / n = x(y1 + y2 + ... + yn) / n = y(z1 + z2 + ... + zn) / n = z 


[edited by - Neosmyle on October 5, 2002 8:26:37 PM]
Define "center"... there are many different centers of a triangle.

This topic is closed to new replies.

Advertisement