Sub topic 1
Rays, Wavefronts, and Measuring Angles from the Normal
Prerequisites
This chapter assumes you know basic trigonometry, including sine and inverse sine. You should be able to measure an angle and understand that light travels in straight lines through a uniform material.
Rays and wavefronts
A ray is a line that shows the direction light travels. A wavefront is a surface on which all points of a light wave have the same phase. Rays are always perpendicular to wavefronts.
The normal and measured angles
The normal is an imaginary line perpendicular to a surface at the point where a ray hits it. Optics measures all angles from the normal, not from the surface. The angle of incidence (θi) lies between the incoming ray and the normal. The angle of reflection (θr) lies between the reflected ray and the normal.
The law of reflection
The law of reflection states that θi = θr. The incident ray, the reflected ray, and the normal all lie in one plane. For calculations, the reflected direction is r = d − 2(d·n)n, where d is the incoming direction and n is the unit normal to the surface.
def reflect(d, n):
"""Reflect direction d off a surface with unit normal n (2D tuples)."""
dot = d[0] * n[0] + d[1] * n[1]
return (d[0] - 2 * dot * n[0], d[1] - 2 * dot * n[1])
print(reflect((1, -1), (0, 1)))This prints (1, 1). The horizontal part of the direction stays the same, and the vertical part flips sign.
Mirror-like and scattered reflection
Reflection depends on how smooth the surface is.
| Surface | Reflection type | Result |
|---|---|---|
| Polished metal or glass | Specular | Parallel rays leave as a clear image |
| Paper or rough stone | Diffuse | Rays scatter in many directions |
Both types obey the law of reflection at each microscopic point. A rough surface simply has many small normals pointing in different directions.
Refractive index: how fast light travels in a material
The refractive index n of a material is n = c / v, where c is the speed of light in vacuum and v is its speed in the material. Vacuum has n = 1. Water is about 1.33, and common glass is about 1.5. Light slows in a material, but its frequency does not change.
> Angles are always measured from the normal. Measuring from the surface gives the wrong sine in Snell's law.
Exercise
Exercise
A ray travelling in direction (1, -1) hits a horizontal mirror whose normal is (0, 1). What is the reflected direction?
Show answer
(1, 1). The vertical component changes sign and the horizontal component stays the same.