Rotations in NMR: Part I. EulerRodrigues parameters and quaternions