Extensions of the Ray Equations of Geometric Optics to Include Diffraction Effects