  Nowadays the geometric approach in optics is often used to find out media
parameters based on propagation paths of the rays because in this case it is a
direct problem. However inverse problem in the framework of geometrical optics
is usually not given attention. The aim of this work is to demonstrate the work
of the proposed the algorithm in the framework of geometrical approach to
optics for solving the problem of finding the propagation path of the
electromagnetic radiation depending on environmental parameters. The methods of
differential geometry are used for effective metrics construction for isotropic
and anisotropic media. For effective metric space ray trajectories are obtained
in the form of geodesic curves. The introduced algorithm is applied to
well-known objects - Maxwell and Luneburg lenses. The similarity of results
obtained by classical and geometric approach is demonstrated.
