Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Given a list of coordinates of a coplanar plane (pt1, pt2, pt3 and so on), how to compute the centroid of the coplanar plane?

One way to do it is to project the plane onto XY and YZ plane, but I don't really favor this approach as you have to check the orientation of the coplanar plane first before doing the projection and computing the centroid.

More specifically, I'm looking for a natural extension of the 2D centroid plane algorithm in 3D:

alt text alt text

alt text

Any idea?

share|cite|improve this question
up vote 3 down vote accepted

You can take any two orthogonal vectors $\vec{e_1}$ and $\vec{e_2}$ on the plane and use them as a basis. You also need some point $(x_0, y_0, z_0)$ on the plane as origin.

Given point with coordinates $(x_1, y_1, z_1)$ on your plane you calculate it's coordinates with respect to new basis:

$x = (x_1 - x_0) e_{1x} + (y_1 - y_0) e_{1y} + (z_1 - z_0) e_{1z}$
$y = (x_1 - x_0) e_{2x} + (y_1 - y_0) e_{2y} + (z_1 - z_0) e_{2z}$

And after that you can apply your formulae to get $C_x$ and $C_y$. Those coordinates are easyly transformed back into original 3d coordinates:
$x = x_0 + e_{1x} C_x + e_{2x} C_y$
$y = y_0 + e_{1y} C_x + e_{2y} C_y$
$z = z_0 + e_{1z} C_x + e_{2z} C_y$

share|cite|improve this answer
So, the final formula is? – Graviton Aug 2 '10 at 7:19
Also, where is Cz? – Graviton Aug 2 '10 at 11:53
There is no $C_z$. You convert original 3d problem into 2d problem, find $C_x$ and $C_y$ and convert back to 3d. – falagar Aug 2 '10 at 12:14
The answer is $(x, y, z)$ given by the last formulae. – falagar Aug 2 '10 at 12:20
converting this 3d problem into 2d problem is the last thing i want. – Graviton Aug 9 '10 at 12:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.