The trace proceeds along the predefined sequence of surfaces. Rays travel from the object plane to the image plane, passing through each surface once in the defined order. At each surface, refraction or reflection is applied to update the ray’s position and direction, and optical path length is accumulated across the surface spacings.
The difference in accumulated optical path length — the optical path difference, divided by the wavelength — is the wavefront aberration, defined as the departure of the actual wavefront at the exit pupil from an ideal reference sphere. Expanding the wavefront aberration as a function of field and pupil coordinates yields the classical aberration coefficients. The fourth-order coefficients, that is the first-order aberration coefficients, are given by the Seidel sums. The remaining wavefront error is decomposed into Zernike polynomials and can be read off as terms such as spherical aberration, coma and astigmatism.