Optical Fiber Light Rays (2D, Snell's Law & Bend Loss)
2D side-view optical fiber ray tracer: real Snell's-law refraction and total internal reflection against an exact core-cladding boundary, a genuine critical angle from n_core/n_cladding, adjustable fiber bend radius with real geometric bend loss, and a multimode dispersion demo built from actual path-length-derived arrival times.
This 2D side-view companion traces individual light rays through an optical fiber using real geometric optics — no shortcuts, no precomputed guided/leaky lookup. Each ray is followed bounce by bounce against the actual core-cladding wall (including through a bent section), with the angle of incidence measured fresh at every hit from the wall's true local normal. Reflect if the incidence angle clears the critical angle θc = asin(n2/n1); refract and escape if it doesn't. Because the wall's normal rotates as the fiber bends while a ray's own direction between bounces does not, tightening the bend radius genuinely knocks previously-guided rays below the critical angle — real bend loss, derived, not looked up. A dispersion readout turns each guided ray's own traced path length into a real arrival-time spread at v = c/ncore, the same mechanism that limits multimode fiber bandwidth in the real world.
2D side-view optical fiber ray tracer: real Snell's-law refraction and total internal reflection computed at the exact core-cladding boundary, a genuine critical angle derived from n_core and n_cladding, an adjustable fiber bend radius that causes real geometric bend loss as it tightens, and a multimode dispersion demo built from each ray's actual traced path length and arrival time.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install