Optical fibre: critical angle, numerical aperture and loss in JavaScript
An optical fibre guides light by total internal reflection: the core has a higher refractive index n₁ than the cladding n₂. Here are the key formulas in code. (I build PractiSci, where optical fibre i