Mathematical Foundation
Fermat's Principle
δL = 0
The optical path length is stationary (usually a minimum) for the actual ray path.
Optical Path Length
L = ∫AB n(x,y,z) ds
Where n is the refractive index and ds is the path element.
Snell's Law from Fermat's Principle
n₁sin(θ₁) = n₂sin(θ₂)
The ratio of sines of angles equals the inverse ratio of refractive indices.
Interactive Demonstration
Adjust the refractive indices and point positions to see how light finds the optimal path.
Refractive Indices
Source Point Position
Visualization Mode
Path Statistics
Understanding the Visualization
Optimal Path
Light follows the path that minimizes the total travel time. This is shown as the solid red line, calculated using Snell's Law derived from Fermat's Principle.
Path Variation
Explore alternative paths around the optimal one. The dashed lines show how travel time increases for non-optimal paths, demonstrating δL = 0 at the minimum.
Time Map
Color-coded regions showing travel time from source to each point. Light naturally follows the gradient toward minimum time paths.
Real-World Applications
Optics & Photonics
Design of lenses, prisms, and optical fibers based on light path optimization.
Atmospheric Refraction
Explains mirages, sunset timing, and GPS signal propagation through atmosphere layers.
Seismology
Earthquake wave paths through Earth's varying density layers follow similar principles.