In an uniform gravitational field the center of gravity is equal to center of mass of a mass distribution. The center of mass of a colinear discrete mass distribution is given by:
where M is the total mass of the system, m_i the mass of each particle and xi is its position. In this case we have: