Systems, methods, and software for determining a set of analytical or numericalpolynomials that is orthonormal over circular or noncircular pupils are described.Closed-form orthonormal polynomials for circular, annular, hexagonal, elliptical,rectangular, and square pupils are derived. Such techniques can be applied toray tracing as in the optical design and wavefront fitting from measurement asin the optical testing. These approaches can also be applied to wavefront reconstructionin adaptive optics.