Implementation of Newton-Euler Dynamics for general motion of a rigid body in 3D space.