The coordinates of the center of mass are:
xc=(∫xρ(x,y,z)dxdydz)/m
yc=(∫yρ(x,y,z)dxdydz)/m
zc=(∫zρ(x,y,z)dxdydz)/m
The above points are volume points.
If there are several particles, the center of mass can be calculated as follows:
xc =(m 1 * x 1+m2 * x2+m3 * x3)/(m 1+m2+m3)
YC =(m 1 * y 1+m2 * y2+m3 * y3)/(m 1+m2+m3)
ZC =(m 1 * z 1+m2 * z2+m3 * z3)/(m 1+m2+m3)