Generalized method for seeking q-preserving configurations of multi-pass cells.