Rocking motion of two- and three-dimensional rigid bodies: Formulation and parametrical analysis