<P> The vertical position of the centroid is found in the same way . </P> <P> The same formula holds for any three - dimensional objects, except that each A i (\ displaystyle A_ (i)) should be the volume of X i (\ displaystyle X_ (i)), rather than its area . It also holds for any subset of R d (\ displaystyle \ mathbb (R) ^ (d)), for any dimension d (\ displaystyle d), with the areas replaced by the d (\ displaystyle d) - dimensional measures of the parts . </P> <P> The centroid of a subset X of R n (\ displaystyle \ mathbb (R) ^ (n)) can also be computed by the integral </P> <Dl> <Dd> C = ∫ x g (x) d x ∫ g (x) d x (\ displaystyle C = (\ frac (\ int xg (x) \; dx) (\ int g (x) \; dx))) </Dd> </Dl>

Equation for finding the centroid of a triangle