Optical path length with fixed endpoints
Every comparison path must keep both endpoints. A shorter path to some other detector tells you nothing about Fermat stationarity.
Optics 007 · Ray worlds, boundaries, and natural optics
Why can one rule about travel time explain reflection, refraction and curved light rays? Because a real ray is the path whose travel time does not change, to first order, when you wiggle the path slightly with its ends fixed. That single condition gives equal angles at a mirror, Snell's law at an interface, and curved rays wherever the refractive index varies smoothly.
Source and detector stay fixed while you drag a trial path across an opaque mirror, an interface between two indices or a continuous parabolic GRIN medium. The physical ray, the trial variation, the optical-path landscape and the residual of the governing law all come from one model.
Physics tutorial
BackgroundFermat's principle compares nearby paths that share the same two endpoints. The real ray is the one that makes the optical-path functional stationary: . The word “stationary” matters. The direct paths in this Lab are local minima, but other optical systems can have stationary maxima or saddle paths. The principle does not say that light always takes the geometrically shortest route.
Why it mattersWhy can one rule about travel time explain reflection, refraction and curved light rays?
Start with the essentials
Every comparison path must keep both endpoints. A shorter path to some other detector tells you nothing about Fermat stationarity.
Making the optical path stationary as the hit point slides along the boundary keeps the tangential optical momentum the same. For a mirror both segments have the same index, and the condition becomes equal angles of incidence and reflection.
The GRIN path is integrated from this equation and solved as a boundary-value problem. A separate numerical check tracks the axial optical momentum, which is conserved.
Typical misconceptionLight simply takes the geometrically shortest line, so the refractive index and the nearby paths hardly matter.
Better mental modelOptical path length weights each segment by its local refractive index. Reflection, refraction and smooth bending all follow from making that weighted length stationary with the endpoints held fixed.
In the mirror scene, drag the magenta surface point onto the gold hit. Compare the two mirror angles and find the stationary point of the arrival-time landscape.
What to observe: Only the gold path turns at the mirror, at the hit where the angles are equal. The dashed comparison path is not reflected light, and no photon pulses travel along it.Switch to the two-medium scene and move the target. The stationary crossing moves with it, while the source and target stay fixed during each variation sweep.
What to observe: The stationary crossing usually sits away from where a straight line would cross the interface, because the slower medium weighs more heavily in the optical path.Enter the GRIN scene and orbit the camera through the index contours. Then bring the trial deformation back to zero while watching the first variation and the momentum residual.
What to observe: The GRIN ray bends smoothly toward higher index. Real rays launched in nearby directions end up elsewhere, while every magenta variation still ends on the chosen target.