Dynamics of a System of Rigid Bodies