On variational formulations with rigid-body constraints for finite elasticity: Applications to 2D and 3D finite element simulations. (December 2016)