Refraction from secondary wavelets (source code)

= Refraction from secondary wavelets

Let a plane incident <wavefront> first meet a flat interface at $A$, and let another point $B$ on that front reach $C$ on the interface after $\Delta t$. Its path has length $BC=v_1\Delta t$. The secondary wavelet from $A$ has radius $AD=v_2\Delta t$ in the second medium; the new <wavefront> through $C$ is tangent to it at $D$. Right triangles with common hypotenuse $AC$ give $\sin\theta_1=BC/AC$ and $\sin\theta_2=AD/AC$, where both ray angles are measured from the interface normal. Consequently $\sin\theta_1/\sin\theta_2=v_1/v_2=n_2/n_1$, which is <Snell's law>. The construction uses <phase velocities> in homogeneous isotropic media.