Artificial intelligent assistant

Simple question related to Snell's law There are two media and they are stacked vertically like the figure below. Medium 1 - height : h, refractive index : $n_1$ Medium 2 - height : h, refractive index : $n_2$ A laser beam travels through these media from the left-top corner with the initital incident angle $\theta_1$. Is it possible to analytically determine the horizontal distance the laser beam moves forward when it reaches the bottom? *$\theta_2$ can't be included in the answer. ![enter image description here](

I belive the answer is given by $$ d = h [\tan \theta_1 + \tan \theta_2]$$ each term giving you thee horizontal distance travelled for each medium.

Now, according to Snell's law $$\frac{\sin \theta_1}{\sin \theta_2} = \frac{n_1}{n_2}$$ so $$\theta_2 = \arcsin \left(\sin \theta_1 \cdot \frac{n2}{n1}\right)$$ and upon substituing $$ d = h \left[\tan \theta_1 + \tan \,\arcsin \left(\sin \theta_1 \cdot \frac{n2}{n1}\right)\right] $$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy abd681f27c2dd35d272ef14a6340ce83