The geometry of rigid and non-rigid structures