Finding the center of mass of a solid region - B