B8 · Lesson 17 · Optics lab
Refraction and reflection, lens systems by matrices, coatings and fibers in code
Optical design is calculation: how much a surface reflects at each angle, where a lens system focuses, what a stack of coatings does to each color, how many modes a fiber carries. Each has a compact method. In this lab you'll write Snell's law with total internal reflection, the Fresnel equations for both polarizations, ray-transfer matrices for lens systems, the transfer-matrix method for thin-film stacks, and a fiber's V-number, checking each against the results of lessons 7 to 16.
- Light meets glass (n = 1.5) from air. The two curves are the reflectances for s and p polarization against the angle of incidence.
- At normal incidence both are 4%. The p curve dips to zero at Brewster's angle, 56.3°, and both climb to 100% at grazing incidence.
- Change the glass's index: Brewster's angle moves to , and a denser material reflects more at every angle.
Predict
Two thin lenses, each with a 100 mm focal length, sit 50 mm apart. What is the focal length of the pair?
About 67 mm. In contact they'd make 50 mm, since powers add; separating them weakens the pair, to mm. Ray-transfer matrices give this, and any other arrangement of lenses and gaps, by multiplying 2 × 2 matrices.
Name it
Snell and Fresnel
At a boundary, ; if there's no transmitted ray and everything reflects. The amplitude reflection coefficients are
and the reflectances are their squares.
Ray-transfer matrices
A paraxial ray is a height y and an angle θ. A gap d multiplies it by , a thin lens by . A whole system is the product of its elements' matrices, written right to left in the order the light meets them, and its effective focal length is where C is the lower-left entry.
Thin-film stacks
At normal incidence each layer of index n and thickness t has the characteristic matrix , . Multiply the layers' matrices from the top down, apply the product to to get , and the reflectance is . This handles any number of layers at any thickness, where the quarter-wave formulas only cover special cases.
Fiber modes
A step-index fiber of core radius a and numerical aperture NA has . It carries one mode when V < 2.405, and roughly modes when V is large. The single-mode cutoff wavelength is .
Worked example
Light inside glass (n = 1.5) meets the surface with air at 0.9 rad (51.6°). What happens, and what about at 0.7 rad?
Show the solution
- Look for a transmitted ray. Snell's law would need so there's no transmitted ray: total internal reflection, with reflectance 1 for both polarizations.
- Critical angle.
- At 0.7 rad (40.1°). Just inside the critical angle, the ray escapes at 75.1°, and the reflectance is already high: 40% for s and 11% for p.
- Close to the critical angle. The reflectance rises steeply to 100% over the last 1.7°.
- Binoculars. Prisms in binoculars use total internal reflection because no metal mirror reflects as well.
Answer at 0.9 rad the light is totally reflected. At 0.7 rad it escapes at 75.1°, with 40% of s and 11% of p reflected.
Worked example
What does a single quarter-wave layer of magnesium fluoride (1.38) do on glass (1.5) at 550 nm, and at 450 nm?
Show the solution
- At 550 nm. At its design wavelength the transfer matrix gives R = 1.41%, compared with 4.0% for bare glass.
- Check with the formula. That matches the quarter-wave formula:
- At 450 nm. The same layer is 0.31 of a wave thick rather than a quarter, and the reflectance climbs back to about 1.7%.
- Broadband coatings. Broadband coatings stack several layers so that the dips at different wavelengths overlap, which is the kind of design the transfer matrix makes routine.
Answer it reflects 1.41% at 550 nm and about 1.7% at 450 nm, against 4.0% for bare glass.
Worked example
Is standard single-mode fiber (a = 4.1 µm, NA = 0.12) single-mode at 1550 nm? And a multimode fiber with a = 25 µm and NA = 0.2 at 850 nm?
Show the solution
- Single-mode fiber at 1550 nm. below 2.405, so yes.
- Its cutoff. so at 1310 nm it is only barely single-mode.
- Multimode fiber at 850 nm.
- Number of modes. It carries about modes, each traveling at a slightly different speed: that modal dispersion limits it to a few hundred meters at high data rates.
Answer the standard fiber is single-mode at 1550 nm (cutoff 1.29 µm). The multimode fiber has V = 37.0 and carries about 683 modes.
Check
Step 1. Write snell(n1, n2, th) returning the refracted angle in radians, or None when there's total internal reflection, and fresnel(n1, n2, th) returning (Rs, Rp), with both equal to 1 under total internal reflection.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Step 2. Write lens(f) and gap(d) returning ray-transfer matrices, and efl(M) returning a system's effective focal length, . Use them to find the focal length of two 100 mm lenses 50 mm apart.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Step 3. Write multilayer_R(n0, layers, ns, lam) returning the normal-incidence reflectance of a stack: layers is a list of (n, t) from the top down, ns the substrate's index, lam the wavelength, in the same length units as t.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Step 4. Write fiber(a, NA, lam) returning (V, modes, cutoff): the V-number, the rough mode count , and the single-mode cutoff wavelength.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Step 5. A camera's two-element lens is a +50 mm lens followed 20 mm later by a −100 mm lens. Write system() that returns its matrix, and back_focus(M) that returns how far behind the last lens a parallel beam comes to a focus: the distance d where the product gap(d) @ M has a zero upper-left entry. lens and gap are included.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Lenses of 50 mm and 50 mm sit 40 mm apart.
(a)
What is the pair's effective focal length?
Write units the way you normally would: 1.5 mm, 1500 µm and 0.0015 m are the same answer.
(b)
What would it be with the lenses in contact?
Check
A step-index fiber has core radius 4 µm and NA = 0.1. Below what wavelength does it carry more than one mode?
Write units the way you normally would: 1.5 nm, 1500 pm and 0.0015 µm are the same answer.
Explain why
Why does a ray-transfer matrix system have to be multiplied in the reverse of the order the light meets the elements?
Each matrix takes a ray's height and angle just before an element and returns them just after it. The first element the light meets acts on the input ray first, so its matrix must sit next to the input vector, on the right; the next element then acts on that result, so its matrix goes to the left of the first, and so on. Writing means the ray passes element 1, then 2, then 3. Matrix multiplication doesn't commute, so swapping the order describes a different system, such as a lens and gap in the wrong sequence, and gives different answers.
Practice
Keep practicing
4 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.