Diffraction theory, developed in vectorial form and coded into ray tracing routines, permits tracing rays of any wavelength through surfaces that are plane, spherical, conical, or aspheric polynomial. Ruled diffraction gratings may run in either X-direction or Y-direction, where Z is optical axis