The coordinates of the "centroid" of a triangle is simply the average of the coordinates of the three vertices. That is, if the coordinates of the three vertices of a triangle are $\displaystyle (x_0, y_0, z_0)$, $\displaystyle (x_1, y_1, z_1)$ and $\displaystyle (x_2, y_2, z_2)$ then the centroid is $\displaystyle \left(\frac{x_0+ x_1+ x_2}{3}, \frac{y_0+ y_1+ y_2}{3}, \frac{z_0+ z_1+ z_2}{3}\right)$.