[Math] Find the centroid of a 3D polygon

geometry

I have a 3-dimensional polygon with 3 vertices:

v1 = (0, 0, 0)
v2 = (0, 1, 1)
v3 = (2, 0, 2)

How can I find the centroid of this shape? My math is not that good, so understanding the solution for the simple example I've provided would be very helpful. Thanks in advance for the help.

Best Answer

Find the equation of the line for two of the medians, and compute the intersection.

The line from $v_1$ to the midpoint of the opposite side can be parametrized by:

$$(x,y,z)=(0,0,0)+t(2,1,3)$$

The line from $v_2$ to the midpoint of the opposite side can be parametrized by:

$$(x,y,z)=(0,1,1)+s(1,-1,0)$$

This gives us the system of equations:

$$x=2t=s\\y=t=1-s\\z=3t=1$$

So we see that $t=\frac{1}{3}$ and $s=\frac{2}{3}$ is the intersection, which gives the point $(\frac{2}{3},\frac{1}{3},1)$ as the centroid.

Related Question