Sub topic 2
The law of reflection
This chapter assumes you know basic trigonometry (sine and angles) and the idea that light travels in straight lines in a uniform medium. It builds on the ray model from the previous chapter. Here you will learn the one rule that governs how a ray bounces off a smooth surface, how to apply it to flat and curved surfaces, and where it stops being simple.
What reflection is
Reflection is the return of a ray into the medium it came from after it meets a boundary. Part of the light may also pass into the second material (refraction, covered later), but the reflected part follows its own rule.
Three terms define the geometry:
- The incident ray is the ray arriving at the surface.
- The reflected ray is the ray leaving the surface.
- The normal is the line perpendicular to the surface at the point where the ray lands.
Angles are always measured from the normal, not from the surface. This is the most common source of mistakes. A ray that skims almost parallel to the surface has an angle close to 90 degrees.
The two statements of the law
The law of reflection has two parts:
- The incident ray, the reflected ray, and the normal all lie in one plane.
- The angle of reflection equals the angle of incidence: θr = θi.
The first statement means a ray hitting a mirror does not veer sideways. The reflected ray stays in the plane formed by the incoming ray and the normal. The second statement fixes the direction within that plane.
Specular and diffuse reflection
The law applies at every point of every surface. What differs is how the surface is oriented from point to point.
- Specular reflection happens on a smooth surface, such as a mirror or still water. Neighboring parallel rays meet parallel normals, so they leave parallel. The reflected light keeps its arrangement, and you can see an image.
- Diffuse reflection happens on a rough surface, such as paper or cloth. The normals point in many directions at the microscopic scale. Each ray still obeys θr = θi locally, but the reflected rays scatter. No image forms, and the surface looks the same from many angles.
A surface counts as smooth when its bumps are much smaller than the wavelength of the light. Polished metal is smooth for visible light. The same surface would be rough for much shorter wavelengths.
Working with the law in vector form
For calculations, it helps to treat the ray as a direction vector d and the surface by its unit normal n. Reflection reverses the component of d along the normal and leaves the component along the surface unchanged:
r = d − 2(d · n)n
The term (d · n)n is the part of the ray along the normal. Subtracting it twice flips that part and keeps the rest. This formula is useful for programs such as ray tracers, and it works unchanged for curved surfaces once you know the normal at the point of contact.
import math
def reflect(d, n):
"""Reflect the 2D direction vector d off a surface with normal n."""
length = math.hypot(n[0], n[1])
nx, ny = n[0] / length, n[1] / length # make the normal a unit vector
dot = d[0] * nx + d[1] * ny
return (d[0] - 2 * dot * nx, d[1] - 2 * dot * ny)
def angle_from_normal(v, n):
"""Angle in degrees between a ray direction v and the line of the normal n."""
cos_a = abs(v[0] * n[0] + v[1] * n[1]) / (math.hypot(*v) * math.hypot(*n))
return math.degrees(math.acos(min(1.0, cos_a)))
def clean(v):
"""Round tiny floating-point noise; adding 0.0 turns -0.0 into 0.0."""
return tuple(round(c, 6) + 0.0 for c in v)
# A ray heading down and to the right hits a horizontal mirror (normal points up).
d = (1, -1)
n = (0, 1)
r = reflect(d, n)
print(clean(r)) # (1.0, 1.0)
print(round(angle_from_normal(d, n), 2),
round(angle_from_normal(r, n), 2)) # 45.0 45.0
# The same ray, now hitting a mirror tilted so its normal is (1, 1).
d = (1, 0)
n = (1, 1)
r = reflect(d, n)
print(clean(r)) # (0.0, -1.0)
print(round(angle_from_normal(d, n), 2),
round(angle_from_normal(r, n), 2)) # 45.0 45.0The angle_from_normal function uses the absolute value of the dot product, so it measures the angle to the normal line regardless of which way the normal points. That is the quantity the law compares.
Rotating a mirror
A useful consequence of the law: if you rotate a mirror by an angle α while the incident ray stays fixed, the normal also rotates by α. The angle of incidence changes by α, and so does the angle of reflection. The reflected ray therefore turns by 2α.
This doubling is used in practice. A small tilt of a mirror produces a large movement of a reflected beam, which is why mirrors are used in laser scanners and in sensitive light-lever instruments.
| Mirror rotation | Reflected ray rotation |
|---|---|
| 5° | 10° |
| 15° | 30° |
| 45° | 90° |
Curved surfaces
A curved mirror does not need a new law. At each point where a ray lands, you draw the normal to the curve at that point and apply θr = θi. Different points have different normals, which is why a curved mirror can bring parallel rays together or spread them apart. A later chapter works this out for spherical mirrors. For a sphere, the normal at any point lies along the radius through that point, which makes the geometry manageable.
Common errors
- Measuring from the surface. The law uses angles from the normal. If a problem gives the angle between the ray and the mirror, subtract it from 90° first.
- Forgetting the plane condition. In three dimensions the reflected ray lies in the plane of the incident ray and the normal. Checking only the equal angles is not enough to locate it.
- Using a non-unit normal. In the vector formula, n must have length 1. Otherwise the result has the wrong length and direction. The code above normalizes it for this reason.
- Expecting diffuse surfaces to form images. They obey the law but scatter the light, so they do not form a clear image.
Exercise
Exercise
A ray strikes a flat mirror and makes an angle of 25° with the surface of the mirror (not with the normal). What is the angle between the incident ray and the reflected ray, and by how much does this angle change if the mirror is rotated by 10° about the point of incidence in the direction that increases the angle of incidence, with the incident ray held fixed?
Show answer
The angle from the normal is 90° − 25° = 65°, so θi = θr = 65°. The angle between the incident and reflected rays is 65° + 65° = 130°. Rotating the mirror by 10° turns the normal by 10°, so the angle of incidence becomes 75° and the angle of reflection also becomes 75°. The angle between the incident and reflected rays becomes 150°, a change of 20°, which is twice the mirror rotation.