Text this: Ray optics, Fermat's principle, and applications to general relativity /