Wolfram Alpha:

```Refractive Index
----------------

faster   |   slower
n1  |  n2     .
|     .
|  .  θ2
..........|..........
θ1 /|
/ |
/  |
/   |

n = c/v  where v = net velocity of light inside material.  Photons, and all
massless particles, can only ever move at the speed of light.  What happens
is that photons keep colliding with atoms and give their energy up to
electrons. But the electrons don't hold onto it for very long and emit it
again as another photon. This stop/start has an average velocity of less
than c but every photon still moves at c.  When waves from a monochromatic
source travel from one medium to another, their frequency remains the same.
Since v = fλ the wavelength changes to compensate for this velocity change.
This is illustrated in the follow diagram.

The wavefronts associated with a light ray are analagous to waves on the
ocean.  Light rays are always perpendicular to their wavefronts.  As the waves
hit the shore they slow and their wavelengths contract to compensate.

Color is the sensation produced by frequency of the light incident on the retina
in the eye.  Since the frequency does not change due to refraction, the color
sensed by the eye also does not change.

Refraction does cause dispersion with white light because the refractive index
of the medium is dependent on color.  For example,  the refractive index of glass
for red and violet light is 1.631 and 1.657 respectively.  White light is dispersed
(separated) into different colours due to refraction but the individual color
frequencies are not changed.

Snell's Law:  n1sinθ1 = n2sinθ2

1n2 = 1/2n1

1n3 = 1n2 * 2n3

Total Internal Reflection (critical angle, θc)
---------------------------------------------
This occurs when refracted light wave runs parallel to the surface.  At
angles greater than θc the light will be totally internally reflected
within the medium.

n1sinθ = n2sin(90)

For air n2 ~ 1 so n1sinθ = 1

Ex:

Find angle of refraction in water if angle of incidence in oil is 30 degrees

Air
-------
Oil    ano = 1.20
-------
Water  anw = 1.33

anw = ano * onw

=> onw = anw/ano = 1.33/1.20 = 1.11

sin(30)/sin(r) = anw/ano = onw = 1.11

=> r = 27 degrees

Prism
-----

n1sinθ1 = n2sinθ2

n2sinθ3 = n1sinθ4

/_PNM + φ + /_MQP + /_QPN = 360  [ (n - 2)*180 = sum of interior angles ]

90 + φ + 90 + /_QPN = 360

Therefore,

φ + /_QPN = 180

Now,

/_QPN + /_QPT = 180

Therefore,

/_QPT = 180 - /_QPN

= 180 - (180 - φ)

= φ

Now,

180 - (θ1 + θ3) = /_QPN

= 180 - φ

Therefore,

(θ1 + θ3) = φ

The total deviation, δ is given by,

δ = β + γ

= (θ1 - θ2) + (θ4 - θ3)

The maximum deviation occurs when the incident ray is 90 degrees to the normal
(i.e. θ1 = 90)

The minimum deviation occurs when the ray passes symetrically through the
prism (i.e. is parallel to the base of the prism).  The formula for the
minimum deviation can be found using.

n2/n1 = sin(1/2)(φ + δ)/sin(1/2)φ
```