How to determine the angle of refraction when the medium has position dependent refraction index? Lets say that the angle of incidence on the glassy slab is $\theta_1$ and the ray goes through the slab and emerges on the other side. Refractive index of glass changes with position $n(x)$. The Length of the slab is $H$. How to determine the angle of refraction on the other side?
Some modification of Snell's law is needed?