how to calculate invariant points - Search