Optics & Ray Tracing Playground
Simulate geometric & physical optics in real time with laser beams, convex & concave lenses, mirrors, prisms, Snell's Law refraction, total internal reflection, and chromatic dispersion.
Delete to remove selected element.
Law of Reflection:
For any specular reflective surface, the incident ray, the reflected ray, and the surface normal all lie in the same plane, and:
Snell's Law of Refraction (Willebrord Snell, 1621):
When light crosses the boundary between two optical media with differing refractive indices (n1 and n2):
Total Internal Reflection Condition:
When light travels from an optically denser medium to a rarer medium (n1 > n2), there exists an angle of incidence for which the refracted ray travels along the boundary (θ2 = 90°).
Practical Critical Angles (into Air, n2 = 1.00):
| Material | Refractive Index (n) | Critical Angle (θc) | Application |
|---|---|---|---|
| Water | 1.333 | 48.6° | Underwater Snell's Window |
| Crown Glass | 1.520 | 41.1° | Porro Prisms in Binoculars |
| Diamond | 2.417 | 24.4° | Brilliant gem sparkle via light trapping |
Gaussian Thin Lens Equation:
Relates object distance (do), image distance (di), and focal length (f):
M = hi / ho = −(di / do)
Cartesian Sign Conventions:
- Convex (Converging) Lens: Focal length f > 0 (positive).
- Concave (Diverging) Lens: Focal length f < 0 (negative).
- Real Image: Formed on opposite side of lens (di > 0, inverted).
- Virtual Image: Formed on same side as object (di < 0, upright).
Lensmaker's Equation (Thin Lens in Air):
Cauchy's Dispersion Equation:
The refractive index of transparent media decreases with increasing wavelength (λ):