Gravar-mail: Optimization on the space of rigid and flexible motions: an alternative manifold optimization approach