Hover over the menu bar to pick a physics animation.

For Snell's law, the critical concept is that the microscopic phase variation at the refractive surface has
to be the same on both sides of the interface. Otherwise we would have discontinuities of the
sum of the incident, reflected, and refracted wave amplitudes. If we **did** have a discontinuity
of this sum that would mean that we **instantaneous** change of wave energy there and that is a violation
of physical principles. Another way of stating the same principle is that the discontinuities would
not satisfy the partial differential equation for wave behavior .
To show this phase matching in the most visually definite way, here we will use rectangular wave sectors
which is equivalent to saying that the incident wave has a square wave
amplitude profile. A square wave is
very well approximated by a sum of sinusoidal waves each having multiples of the square wave frequency.
Each sector will have a width of half the waveLength, `lambda` .
The colors of the sectors will alternate
between red for positive amplitude and black for negative amplitude.
Derivation of Snell's law for refractive optical media is given in Appendix 1.

First, we'll discuss the incoming wave train. Its propagation angle is `theta_i` where `theta_i` is measured clockwise with respect to the x axis. It will make a transition to a new wavelength at `x=x_s` where `(x_s,y,z=-oo->+oo)` is the location of the surface of the refractive medium.

It's convenient to start with the tops of the wave train. If the wave sector top starts at (`x_(t0),y_(t0)`) then the bottom left of the sector (with the y coordinate increasing downward as is common for computers) will be described by

`y_t(x_t)=y_(t0)+tantheta(x_t-x_(t0))`

In particular the point of intersection of `y_t` with `x_s` is`y_(ts)=y_(t0)+tantheta(x_s-x_(t0))`

The bottom left of the wave sector will be
`x_(b0)=x_(t0)-w_isintheta`

`y_(b0)=y_(t0)-w_icostheta`

`y_b(x_b)=y_(b0)+tantheta(x_b-x_(b0))`

`y_(bs)=y_(b0)+tantheta(x_s-x_(b0))`

Now we want to have the wave move to the right so we let the left side of each sector be
`x_(tl)=x_(t0)+deltascostheta`

`y_(tl)=y_(t0)+deltassintheta)`

`x_tr=x_(tl)+lambda_i/2costheta`

`y_tr=y_(tl)+lambda_i/2sintheta`

`x_(bl)=x_(tl)+w_isintheta`

`y_(bl)=y_(tl)-w_icostheta`

`x_(tr)=x_(tl)+lambda_i/2costheta`

`y_(tr)=y_(tl)+lambda_i/2sintheta`

Our next task is to find the intersections of `y_(bl), y_(br), y_(tl), and y_(tr)` with `x_s` as a function of `deltas` which is parallel to the wave's propagation direction. The general function for `y(x)` is

`y(x)=y_0+tantheta(x-x_0)`

For the top of the left side of the sector we have:
`x_0=x_(t0)+deltascostheta`

`y_0=y_(t0)+deltassintheta)`

`y_(tl)(x_s)=y_(t0)+deltassintheta-tantheta[x_s-(x_(t0)+deltascostheta)]`

`y_(tr)(x_s)=y_(tl)(x_s)+lambda_i/2sintheta`

When `x_tgtx_s` clipping of the first wave sector will begin and the sector will become a six sided polygon where the intersection with `x_s` is `y_I`: The equation for `y_I` will be:

`y_I=y_b-(x_s-x_b)cottheta`

At the substrate surface, the incident medium sectors change shape (morph) into hybrids with two refractive index parts . The hybrids are 6 sided polygons as seen in the animation. The 6 sided polygon represents both the part of the wave sector that is outside the refractive media and the part that is inside the refractive median. Both of these have the same phase relative to the source as is visually shown by their having the same color. This polygon will continue to be 6 sided until the hybrid sector in fully inside the refractive medium after which it will become 4 sided.It is also important to note that the beam width in the refractive media is

`w_r=w_icostheta_r/costheta_i`

This is a result of the wave's width being perpendicular to its propagation direction. The wave propagation is animated on Canvas 1.

The phase variation of the incident wave along the boundary is

`phi_i(y)=n_ik_iysintheta_i`

where `k_i=(2pi)/lambda_i` are the wave vector and wavelength of the incident wave and `n_i` is the index of refraction in the incident medium. In the refractive medium we have`n_rlambda_r=n_ilambda_i`

where `n_r` is the index of refraction of the refractive medium. so `k_r=(2pi)/lambda_r=n_r/n_ik_i` Let the angle of propagation of the wave in the refractive medium be `theta_r`. Then the phase variation of the refractive wave along the boundary will be:`phi_r(y)=k_rysintheta_r` `phi_r(y)=n_r/n_ik_iysintheta_r`

The phase matching requirement is that`phi_r(y)=n_r/n_ik_iysintheta_r=k_iy=phi_i(y)sintheta_i`

Solving for `sintheta_r` we obtain Snell's law:`sintheta_r=n_i/n_rsintheta_i`

Snell's law is equally valid for sound waves where the speed ratio of the waves, `c_r/c_i`, is the analog of the index ratio of the waves: `n_i/n_r`.