Optics: Reflection and Refraction

Reflection and Refraction: the Basics

Light can be described as an electromagnetic wave.  A light wave has a wavelength λ, frequency f, and period T. 
This wave propagates with a certain phase velocity (Subscript[v, s])= λ/T, which varies depending on the medium through which it is traveling.

When a light wave encounters a boundary between two transmission media, two things can happen.  The light can be transmitted through the boundary (refracted) into the new medium, or it can be reflected back at the boundary.

This code just creates a basic image to illustrate the basic concept and define the angles and rays.

boundary=Graphics[{Thick,Line[{{-5,0},{5,0}}]}];

normalToBoundary=Graphics[{Dashed,Line[{{0,-5},{0,5}}]}];

incidentRay=Graphics[Arrow[{{-4,-2},{0,0}}]];

reflectedRay=Graphics[{Red,Arrow[{{0,0},{4,-2}}]}];

refractedRay=Graphics[{Blue,Arrow[{{0,0},{4,3}}]}];

Show[boundary,normalToBoundary,incidentRay,reflectedRay,refractedRay,
Graphics[{LightBlue,Opacity[0.7],Rectangle[{-5,0},{5,5}]}],
Graphics[Text[Style["(Subscript[k, i])",FontSize->14],{-4.25,-2}]],Graphics[Text[Style["(Subscript[k, r])",FontSize->14,Red],{4.25,-2}]],Graphics[Text[Style["(Subscript[k, t])",FontSize->14,Blue],{4.2,3.2}]],Graphics[Text[Style["(Subscript[θ, i])",FontSize->14],{-0.25,-0.5}]],Graphics[Text[Style["(Subscript[θ, r])",FontSize->14,Red],{0.25,-0.5}]],Graphics[Text[Style["(Subscript[θ, t])",FontSize->14,Blue],{0.25,0.5}]]]

Refractive Index

Light propagates at a speed that depends on the medium, with a maximum speed c in a vacuum. Therefore, every material can be described by the amount that it slows down light relative to its speed in a vacuum.  We call this the refractive index n, and it is defined by

 n=(c/(Subscript[v, s]))=((c T)/λ).
 
The index of refraction is a dimensionless quantity.  Note that it depends on the phase velocity (Subscript[v, s])of the light, which varies with wavelength.  When light enters a new material, its group velocity (propagation speed) changes, but its frequency doesn’t due to conservation of energy; therefore the period T remains constant.

nFunc[freq_]:=3*^8/((freq 10^12) (λ 10^-9))

prism=Show[Graphics[{Dashed,Line[{{-5,0},{5,0}}]}],
Graphics[{Thick,Line[{{0,-5},{0,5}}]}];
Graphics[{LightBlue,Opacity[0.5],Rectangle[{0,-5},{5,5}]}],
Graphics[{Black,Rectangle[{-5,-5},{0,5}]}]];

initialRays[incidenceAngle_]:=Graphics[{Thick,White, Line[{{0,0},AngleVector[{0,0},{5,Pi+(incidenceAngle Pi/180)}]}]}]

prismRefraction[incidenceAngle_,nPrism_,color_]:=Graphics[{Thick,color,Line[{{0,0},AngleVector[{0,0},{5,refractedAngle[incidenceAngle,1,nPrism]}]}]}]

colorList={Purple, Blue, Green,Yellow,Orange,Red};

freqList={700,650,550,525,500,450};

nList:=nFunc[#]/.λ->350&/@freqList;

prism1[angle_,color_]:=prismRefraction[angle,#,color]&/@nList

prism2[angle_]:=prism1[angle,#]&/@colorList

Manipulate[
Show[
prism,
initialRays[angle],
Table[prism2[angle][[i]][[i]],{i,1,Length[colorList]}]
],
{angle,0, 90}
]

Snell’s Law

When reflection occurs, the angle of reflection is always equal to the angle of incidence.  However, the angle of refraction depends on the medium that the light is leaving and that which it is entering.  The refractive indices of the materials determine the angle of refraction according to Snell's Law:

(Subscript[n, 1])(Subscript[sinθ, i])=(Subscript[n, 2])(Subscript[sinθ, t])

where the ray encounters the interface between materials with refractive indices (Subscript[n, 1]) and (Subscript[n, 2]).

Here we initialize the functions that calculate the refracted angle given an incident angle and refractive indices.  These are then used to illustrate the effects of varying these three parameters.  For these purposes, light rays will be defined by their angle, so we can use the AngleVector function.

incident[iAngle_,incidentIntensity_]:=Graphics[Line[{{0,0},AngleVector[{0,0},{incidentIntensity,(3 Pi/2)-(iAngle Pi/180)}]}]]

refraction[tAngle_,refractedIntensity_]:=Graphics[{Blue,Line[{{0,0},AngleVector[{0,0},{refractedIntensity,(Pi/2)-tAngle }]}]}]

refractedAngle[incidentAngle_,n1_,n2_]:=ArcSin[n1/n2 Sin[incidentAngle Pi/180]]

snellsLaw[incidentAngle_,n1_,n2_]:=
refraction[refractedAngle[incidentAngle,n1,n2],5]

Manipulate[
Show[boundary,
normalToBoundary,
Graphics[{LightBlue,Opacity[0.7],Rectangle[{-5,0},{5,5}]}],Graphics[Text[Style["(Subscript[n, 1])",FontSize->14],{4.25,-.25}]],
Graphics[Text[Style["(Subscript[n, 2])",FontSize->14],{4.25,.25}]],
incident[incidentAngle,5],
snellsLaw[incidentAngle,n1,n2]
],
{incidentAngle,0,90},{n1,1,2.5},{n2,1,2.5}]

It is clear from this illustration that there is a certain angle above which Snell’s Law breaks down and no refraction occurs.  This angle depends on the indices of refraction.

Total Internal Reflection

When the incident angle is great enough, no light is refracted through the material, resulting in total internal reflection.  By inspection, one can see that this occurs when the refracted angle is greater than 90º, and therefore (Subscript[sinθ, t]) = 1.  Using Snell’s Law, that gives us the condition for the critical incident angle:
 
(Subscript[θ, c])=arcsin(((Subscript[n, 2])/(Subscript[n, 1])))

Total internal reflection can only occur when the refractive index of the medium the light encounters is less than the medium the light is traveling in: (Subscript[n, 2])< (Subscript[n, 1]).

The greater the difference in refractive index between the two materials, the smaller the critical angle; that means total internal reflection is more likely to occur.  Diamond appears to sparkle because it has a very high index of refraction (n = 2.42), causing light to be trapped inside.

When the critical angle is exceeded, the refracted angle becomes imaginary:

Solve[n1 Sin[θi]==n2 Sin[θt]/.{n1->1.5,n2->1,θi->Pi/4},θt]

A wave with an imaginary component is called an evanescent wave, and carries no energy; its electromagnetic amplitude exponentially decays as it propagates.  Maxwell’s equations dictate that electromagnetic fields cannot be discontinuous at a boundary, so it is impossible to have no refracted wave.  Evanescent waves allow for this condition to be satisfied while allowing total internal reflection (i.e. all energy is carried by reflected wave) to occur.

Fresnel Equations

The relative intensities of the reflected and refracted rays depend of the reflectance R and transmittance T, which are expressed as fractions of the incident intensity and are given by the Fresnel Equations.  Assuming non-magnetic media and unpolarized light, these equations reduce to

R=(1/2)(((((((Subscript[n, 1])(Subscript[cosθ, i]) - (Subscript[n, 2])(Subscript[cosθ, t]))/((Subscript[n, 1])(Subscript[cosθ, i]) + (Subscript[n, 2])(Subscript[cosθ, t])))))^2)+((((((Subscript[n, 1])(Subscript[cosθ, t]) - (Subscript[n, 2])(Subscript[cosθ, i]))/((Subscript[n, 1])(Subscript[cosθ, t]) + (Subscript[n, 2])(Subscript[cosθ, i])))))^2)).

Due to conservation of energy, R + T = 1.

reflectivityS[incidentAngle_,n1_,n2_]:=Module[{tAngle=refractedAngle[incidentAngle,n1,n2]},
((n1 Cos[incidentAngle Pi/180]-n2 Cos[tAngle])/(n1 Cos[incidentAngle Pi/180]+n2 Cos[tAngle]))^2]

reflectivityP[incidentAngle_,n1_,n2_]:=Module[{tAngle=refractedAngle[incidentAngle,n1,n2]},
((n1 Cos[tAngle]-n2 Cos[incidentAngle Pi/180])/(n1 Cos[tAngle]+n2 Cos[incidentAngle Pi/180]))^2]

reflectivity[incidentAngle_,n1_,n2_]:=(reflectivityP[incidentAngle,n1,n2]+reflectivityS[incidentAngle,n1,n2])/2

transmittance[incidentAngle_,n1_,n2_]:=1-reflectivity[incidentAngle,n1,n2]

These formulas come from averaging the reflectivities of s- and p- polarized light, since we assume equal quantities of each in non-polarized light.

The following is an illustration of how the intensity or energy associated with the light is affected by diffraction.  Varying the lengths of the reflected and refracted rays conveys their relative intensities.  Since the refracted angle becomes imaginary, we have to write a separate function for total internal reflection and use an If statement to separate the two.

reflection[rAngle_,reflectionIntensity_]:=Graphics[{Red,Line[{{0,0},AngleVector[{0,0},{reflectionIntensity,(3 Pi/2)+(rAngle Pi/180 )}]}]}]

refractionReflection[tAngle_,rAngle_,refractionIntensity_,reflectionIntensity_]:=Show[
refraction[tAngle,refractionIntensity],reflection[rAngle,reflectionIntensity]]

internalReflection[incidentAngle_,n1_,n2_,refractionIntensity_,reflectionIntensity_,incidentIntensity_]:=
If[refractedAngle[incidentAngle,n1,n2] ∈ Reals,refractionReflection[refractedAngle[incidentAngle,n1,n2], incidentAngle,refractionIntensity,reflectionIntensity],reflection[incidentAngle,incidentIntensity]]

environment[n1_,n2_]:=Show[
Graphics[{LightBlue,Opacity[0.7],Rectangle[{-5,0},{5,5}]}],
boundary,normalToBoundary,
Graphics[Text[Style["(Subscript[n, 1]): "<>ToString[n1],FontSize->14],{4,-.25}]],
Graphics[Text[Style["(Subscript[n, 2]): "<>ToString[n2],FontSize->14],{4,.25}]]
]

Manipulate[
Show[environment[n1,n2],
Graphics[Text[Style["Incident Intensity: "<>ToString[intensity],FontSize->12],{-3,3.2}]],
Graphics[Text[Style["Critical Angle: "<>ToString[ArcSin[n2/n1] 180/Pi],FontSize->12],{-3,4.8}]],
Graphics[Text[Style["Incident Angle: "<>ToString[incidentAngle],FontSize->12],{-3,4}]],
incident[incidentAngle,intensity],
internalReflection[incidentAngle,n1,n2,intensity transmittance[incidentAngle,n1,n2],intensity reflectivity[incidentAngle,n1,n2],intensity]
],{intensity,1,5},
{incidentAngle,0,90},{n1,1,2.5},{n2,1,2.5}]

It is clear that the intensity of transmitted light decreases as the angle of incidence increases, while the intensity of reflection increases until total internal reflection occurs.  It is also obvious why total internal reflection is only possible when (Subscript[n, 1])>(Subscript[n, 2]).

Waveguides

Waveguides rely on this principle to transmit light without losing it to the environment.  They consist of a core material surrounded by cladding of a different material with a lower refractive index to force total internal reflection.  Optical fibers are the most common type of waveguide, and are used to reliably transmit information over long distances.  The larger the difference between the refractive indices of the materials, the more efficient the fiber is.

waveguide[theta_]:=Show[
Graphics[{LightBlue,Opacity[0.7],Rectangle[{0.1,1},{5,1.25}]}],
Graphics[{LightBlue,Opacity[0.7],Rectangle[{0.1,-1.25},{5,-1}]}],
Graphics[{Thick,Line[{{0.1,1},{5,1}}]}],
Graphics[{Thick,Line[{{0.1,-1},{5,-1}}]}],
Graphics[{Thick,Line[{{0.1,1.25},{5,1.25}}]}],
Graphics[{Thick,Line[{{0.1,-1.25},{5,-1.25}}]}],
Graphics[Text[Style["n2",FontSize->12],{4.8,1.125}]],
Graphics[Text[Style["n2",FontSize->12],{4.8,-1.125}]],
Graphics[Text[Style["n1",FontSize->12],{4.8,0}]]
]

distancePoints=Table[i Sin[theta],{i,0,5}]

widthPoints=Table[(-1)^j,{j,0,5}]

reflectionPoints=Table[{distancePoints[[i]],widthPoints[[i]]},{i,1,Length[distancePoints]}]

reflectionPoints/.theta->(Pi/4)

lightPath[angle_]:=Graphics[{Red,Line[reflectionPoints/.theta->angle]}]

Manipulate[Show[waveguide[angle],lightPath[angle]],{angle,0,Pi/2}]

Negative Refractive Index

When light enters a material with a negative refractive index, it refracts on the same side of the normal.

Manipulate[
Show[environment[n1,n2],
incident[incidentAngle,5],
snellsLaw[incidentAngle,n1,n2]
],
{incidentAngle,0,90},{n1,1,2.5},{n2,-2,2.5}]

The Superlens

To illustrate the impact, we need to simulate a lens.  This code uses a list of five angles of incidence to illustrate the effect, and applies this list to the associated sets of incident rays, refracted rays inside the lens, and secondarily refracted rays outside the lens.  It also draws the lens and allows the index of refraction to be manipulated.

incidentRays[angle_]:=Graphics[
{Red,Line[{{0,0},
AngleVector[
{0,0},
{2/Cos[angle],angle}]}]}];

angleList={-Pi/4,-Pi/6,0,Pi/6,Pi/4};

incidentList=Map[incidentRays,angleList];

refractedRays=
{{2,2 Tan[#]},
AngleVector[
{2,2 Tan[#]},
{4/Cos[refractedAngle[# 180/Pi,n1,n2]],refractedAngle[# 180/Pi,n1,n2]}]}&/@angleList;

reRefractedRays=
{AngleVector[
{2,2 Tan[#]},
{4/Cos[refractedAngle[# 180/Pi,n2,n1]],refractedAngle[# 180/Pi,n2,n1]}],
AngleVector[
AngleVector[
{2,2 Tan[#]},
{4/Cos[refractedAngle[# 180/Pi,n2,n1]],refractedAngle[# 180/Pi,n2,n1]}],
{2/Cos[refractedAngle[# 180/Pi,n1,n2]],-refractedAngle[# 180/Pi,n1,n2]}]}&/@angleList;

lens[n2_]:=Show[
Graphics[{LightBlue,Opacity[0.7],Rectangle[{2,-2},{6,2}]}],
Graphics[{Thick,Line[{{2,-2},{2,2}}]}],
Graphics[{Thick,Line[{{6,-2},{6,2}}]}],
Graphics[Text[Style["n2: "<>ToString[n2],FontSize->14],{3,-1.5}]]
];

Manipulate[
Show[
lens[nLens],incidentList,
Graphics[
{Blue,Line[refractedRays/.{n1->1,n2->nLens}]}
],
Graphics[
{Red,Line[reRefractedRays/.{n2->1,n1->nLens}]}
]
],
{nLens,-2,-0.1}
]

In a flat lens of negative refractive index, known as a superlens, light waves that are diverging from a source strike the lens and are refracted back inwards. In the ideal case, at n = -1, all rays intersect in a single point at the center of the lens and are refracted at the other side of the lens to converge again at a point the same distance from the lens as the source on the other side.  In other words, the light is focused twice.  

Ordinary lenses, which only focus once – outside the lens – have resolution that is limited by the wavelength of light; the diffraction limit for these lens is d = λ/2, which is only 200 nanometers for the lower limits of visible light.  When light reflects off an object, the finest details of the object have the highest frequency (lowest wavelength), which decays in amplitude exponentially with a conventional lens, meaning that the highest resolution is lost.  Superlenses remove the diffraction barrier by reamplifying the near field radiation and allowing for subwavelength imaging.

References

1. Wikipedia
2. John Pendry and David Smith, Reversing Light: Negative Refraction, Physics Today, December 2003