The Maxwell equations have a fairly simple form. However, finding solutions to Maxwell's equations is an extremely difficult task. Therefore, various simplifying approaches are often used in optics. One such simplifying approach is to use the approximation of geometric optics. The approximation of geometric optics is constructed with the assumption that the wavelengths are small (short-wavelength approximation). The basis of geometric optics is the eikonal equation. The eikonal equation can be obtained from the wave equation (Helmholtz equation). Thus, the eikonal equation relates the wave and geometric optics. In fact, the eikonal equation is a quasi-classical approximation (the Wentzel-Kramers-Brillouin method) of wave optics. This paper shows the application of geometric methods of electrodynamics to the calculation of optical devices, such as lenses Maxwell and Luneburg. The eikonal equation, which was transformed to the ODE system by the method of characteristics, is considered. The resulting system is written for the case of Maxwell and Luneburg lenses and solved by standard numerical methods. Describes the implementation details and images of the trajectories of rays and fronts of the waves. © 2018 CEUR-WS. All Rights Reserved.