Determine the center of mass of an object