[[Refraction]] occurs when a [[Wave]] (ex. [[Electromagnetic Radiation|Light]]) travels through a medium with a different [[Index of Refraction]], causing the [[Ray]] to bend. ![[Refraction .excalidraw.svg]] %%[[Refraction .excalidraw.md|🖋 Edit in Excalidraw]]%% To measure how much [[Refraction]] happens, we use [[Snell's Law]]. We can compute the refracted [[Vector|vector]] by the following: Let $k$ be the ratio of the incoming [[Index of Refraction]] $\eta_{i}$ and the new medium's coefficient $\eta_{j}$. $\huge k = \frac{\eta_{i}}{\eta_{t}} \\ $ Given the [[Normal Vector|normal]] of the boundry between the two mediums $\hat n$ and the [[Normal Vector|normal]] of the [[Ray|ray]] $\hat \ell$, we can compute the refracted vector $\vec T$ by the following: ![[Refraction _0.excalidraw.svg]] %% ✏️ [[Refraction _0.excalidraw|Edit in excalidraw]]%% $\huge \hat T = \hat n\pa{ k(\hat n \cdot \hat \ell) - \sqrt{ 1-k^{2}(1-(\hat n \cdot\hat \ell)^{2}) } } - k \hat \ell $ >[!info] Derivation >$\begin{align} > >\hat T &= k((\hat{\ell} \cdot \hat{n} ) \hat{n} - \hat{\ell}) - \cos(\theta_{2}) \hat{n} \\ > > &= k(\hat{\ell} \cdot \hat{n} ) \hat{n} - \cos(\theta_{2}) \hat{n} - k \hat{\ell} \\ > &= \pa{k(\hat{\ell} \cdot \hat{n} ) - \cos(\theta_{2})} \hat{n} - k \hat{\ell} \\ > >\\ >k &= \frac{\sin\theta_{2}}{\sin\theta_{1}} \\ >\cos^{2}(\theta_{2}) &= 1 - \sin^{2}\theta_{2} \\ >\sin^{2} \theta_{2} &= k^{2}\sin^{2}(\theta_{2}) \\ >&= 1 - k^{2}(1- \cos^{2}(\theta_{2})) \\ >\cos\theta_{2} &= \sqrt{ 1-k^{2}(1-(\hat{n}\cdot \hat{\ell})^{2} ) } > >\\ \\ > >\hat T &= \boxed{ \hat n\pa{ k(\hat n \cdot \hat \ell) - \sqrt{ 1-k^{2}(1-(\hat n \cdot\hat \ell)^{2}) } } - k \hat \ell } >\end{align}$ > > Note that $\hat T$ is normalized, a fact that I do not want to write the long proof for here.