Wavefront coding (WFC) is an imaging technique for enhancing some invariance capabilities of optical instruments
(typically invariance against defocus). So far, the procedure has been mostly used in practical environments where the
optical aberrations of the optical system correspond to a rotationally symmetrical one, i.e., on-axis imaging. These
problems have been extensively tackled in recent years, leading to successful designs like the cubic and petal-shaped
phase plates. An interesting aspect of the implementation of the phase plate is the use of a liquid crystal spatial light
modulator (SLM) placed at the pupil of the instrument, since it allows enhanced versatility. Under these circumstances,
the characteristics of the pupil phase plate, in order to provide invariance, refer only to spherical and defocus aberrations.
However, when the optical system is not rotationally symmetrical, like for field imaging, the theoretical framework of
the problem is quite different, as one has to deal with more general aberrations. Our aim is to analyze this field imaging
invariance problem when using WFC techniques and to try to extend the well known on-axis techniques to this new
Wavefront measurements are a key point in the development of imaging techniques. Nowadays, a common tool for these
measurements is the Shack-Hartmann sensor, where the results are often given in terms of the Zernike polynomials. The
interpretation of the results, as one moves the Shack-Hartmann sensor in the axial zone, is sometimes difficult as it
involves the task of visualizing the geometrical propagation of the wavefront. We present a numerical tool based on ray
tracing that visualizes wavefronts and caustics as the beam propagates and enables the calculation of the Zernike
polynomials at any intermediate stage.