Invariant angles is achieved by first register the plane formed by the two first segments of a curve, then computing theta and phi.