Analytical Dynamics of Particles and Rigid Bodies