In two or three dimensions, we can perform the same kind of analysis to to obtain the center of mass of a system
This is now a multidimensional integral that needs to be performed.