Embodiments of this invention relate to the generation of wavefronts for measurements, diagnostics, and treatment planning for ophthalmic applications. In some embodiments, a wavefront generator generates light having a uniform wavefront, which is focusable on the retina of an emmetropic eye by the normal function of the emmetropic eye. In some embodiments, the wavefront generator can generate light having a custom wavefront which is not focusable on the retina of the emmetropic eye. In some embodiments, the wavefront generator can receive information relating to an optical aberration of the eye, generate a custom wavefront, and project light having this custom wavefront, which in combination with the optical aberration of the eye is focusable on the retina.