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.
Given:
- 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$
Question:
- What angle of incidence $\theta_i$ is required for a ray cast from $P_{source}$ to intersect $P_\text{dest}$?
- 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?