I need a nudge in the right direction, i guess (this is not a homework question).

I want to calculate the total length of a ray from an emitter to a target which passes through a slab with known properties.


  • Position of Emitter and Target $P_\text{Source}, P_\text{Dest}$
  • Refractive indices of the slab and surrounding medium $n_1, n_2$
  • position and thickness of the slab $d_1$, $d_2$, $d_3$

Double refraction on glass slab


  1. What angle of incidence $\theta_i$ is required for a ray cast from $P_{source}$ to intersect $P_\text{dest}$?
  2. How long is the path the ray actually takes?

I know the incident ray is displaced parallely depending on angle of incidence and refractive indices. I have also found some equation for the determiantion of the offset, but i am still not sure how to apply it to my problem: $$ \begin{equation}\tag{1} \Delta y = d_2 \tan \theta_i \left( 1- \frac{\cos \theta_i}{\sqrt{n^2 - \sin^2 \theta_r}}\right) \end{equation} $$

where $\Delta_y$ is the offset of the ray emerging from the slab.

Could you give me a few directions?

  • 1
    $\begingroup$ Looks like an ideal use for Fermat's principle. $\endgroup$ Commented Feb 19, 2014 at 10:39
  • $\begingroup$ Hint: if you know $\Delta_y$ and you know the thickness of the slab, you can figure out the (x,y,z) location of the exiting ray. $\endgroup$ Commented Feb 19, 2014 at 13:06

1 Answer 1


I found a solution to my problem using the vertical displacement:

$$\begin{equation}\tag{2} h_d = d_1 tan(\theta) + \frac{d_2 tan(\theta)}{n} + d_3 tan(\theta) \end{equation}$$

solved for $\theta$ this becomes

$$\begin{equation}\tag{3} \theta = \arctan \left( \frac{h_d}{d_1 + d_3 + \frac{d_2}{n}} \right) \end{equation}$$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.