Total Internal Reflection Simulator Back
Optics Simulator

Total Internal Reflection Simulator — Critical Angle and Evanescent Wave

When light goes from a high-index medium to a low-index medium and exceeds the critical angle, it totally reflects and an evanescent wave leaks across the interface. Vary the indices and angle to see how.

Parameters
Medium 1 index n_1
Medium 2 index n_2
Incidence angle θ_1
°
Vacuum wavelength λ_0
nm
When n_1 ≤ n_2 total internal reflection cannot occur. Make n_1 larger than n_2.

Defaults (glass n_1=1.50 / air n_2=1.00 / λ_0=633 nm HeNe laser) give θ_c ≈ 41.81°, TIR at θ_1=45° and d_p ≈ 285 nm.

Results
Critical angle θ_c
State
Evanescent depth d_p
Refraction angle θ_2 (only if θ<θ_c)
Interface and rays

blue = incident / green = reflected / red = refracted (hidden in TIR) / yellow dashed = evanescent decay

Theory & Key Formulas

At the boundary between two media with different refractive indices, light propagation is governed by Snell's law.

Snell's law. n is the refractive index and θ is measured from the normal:

$$n_1 \sin\theta_1 = n_2 \sin\theta_2$$

Critical angle θ_c. Defined when n_1 > n_2; beyond it the refracted ray vanishes:

$$\theta_c = \arcsin\!\left(\frac{n_2}{n_1}\right)$$

Evanescent penetration depth d_p (where amplitude falls to 1/e). λ_0 is the vacuum wavelength:

$$d_p = \frac{\lambda_0}{2\pi\sqrt{n_1^{2}\sin^{2}\theta_1 - n_2^{2}}}$$

During TIR the reflectance is R = 1 (all light reflects). The evanescent wave carries energy along the interface but does not propagate into medium 2.

What is the total internal reflection simulator?

🙋
I heard that if you look up from under water, beyond a certain angle the surface acts like a mirror. Is that total internal reflection?
🎓
Exactly. When light tries to leave a denser medium (water, n ≈ 1.33) for a thinner one (air, n = 1), it all reflects back once the incidence angle is large enough. Set n_1 = 1.50 (glass) and n_2 = 1.00 (air) in the simulator and sweep the angle slider. The moment you pass 41.8 degrees the red refracted ray vanishes and only the green reflected ray remains.
🙋
It flips right at 41.8 degrees! How do you compute that number?
🎓
From Snell's law $n_1\sin\theta_1=n_2\sin\theta_2$. The incidence angle for which θ_2 reaches 90° is the critical angle $\theta_c=\arcsin(n_2/n_1)$. Glass to air gives arcsin(1/1.5) = 41.81°. Beyond that, Snell's law would need sin θ_2 > 1, which is impossible, so the refracted ray disappears.
🙋
But even after TIR, that yellow wavy line below the boundary keeps showing up. What is that?
🎓
That is the evanescent wave. Even with total reflection, an exponentially decaying field exists just beyond the boundary. The distance over which its amplitude drops to 1/e (about 37 %) is the penetration depth d_p — around 285 nm with the defaults, roughly half a visible wavelength. It is small but very real.
🙋
What is such a thin wave good for?
🎓
Plenty. Optical fibers trap light by TIR, ATR infrared spectroscopy reads absorption through the evanescent wave, and near-field microscopes use it for sub-wavelength imaging. The right intuition is not "TIR seals the light off" but "TIR leaves a thin field that carries energy along the interface."

Frequently asked questions

From Snell's law $\sin\theta_2=(n_1/n_2)\sin\theta_1$. When n_1 ≤ n_2 the right hand side never exceeds 1, so a real angle θ_2 always exists. A refracted ray is always present, and TIR is impossible. Total reflection only occurs when light tries to exit from a denser medium into a thinner one.
Taking water n = 1.33 and air n = 1.00 gives θ_c = arcsin(1.00/1.33) ≈ 48.6°. From under the water, viewing angles smaller than 48.6° show the sky, while larger angles act as a mirror and reflect the bottom or surroundings. This is "Snell's window" — the circular sky you see when looking up from below water.
d_p is large near the critical angle (deep leakage) and shrinks as you go further past it. Right at θ_c the formula diverges, but this is only a plane-wave idealization; real finite beams saturate to a finite value. Try sweeping θ_1 from 42° to 60° in the simulator to see d_p drop.
Below the critical angle, reflectance follows the Fresnel formulas and depends on polarization (s and p). For p-polarized light there is even a Brewster angle of zero reflectance. Above the critical angle, both polarizations give R = 1, but the reflected beam picks up a polarization-dependent phase shift, which is also the origin of the Goos-Hänchen shift.

Real-world applications

Optical fiber communications: Optical fibers consist of a high-index core surrounded by a lower-index cladding. Light launched into the core bounces along the core-cladding interface by repeated total internal reflection. Only rays beyond the critical angle stay trapped, which sets the numerical aperture. From submarine cables to fiber-to-the-home, this is the backbone of modern telecommunications.

Prism reflectors and binoculars: Binoculars and DSLR pentaprisms use TIR at glass surfaces to redirect light. Compared with metallic mirrors there is far less loss and very little wavelength dependence, giving high-quality images. The 45° Porro prism design works because the 45° incidence exceeds the glass-air critical angle of 41.8° naturally.

ATR infrared spectroscopy: Attenuated total reflectance spectroscopy creates TIR inside a high-index crystal such as ZnSe or Ge and probes the sample with the leaking evanescent wave. Samples need no thinning and solids, liquids and powders can be measured directly, so the method is ubiquitous in pharmaceutical, food and polymer analysis. The few-micron penetration depth also yields surface-sensitive information.

Near-field optics and SPR sensors: Near-field scanning optical microscopes (NSOM) exploit the evanescent wave to image features smaller than the diffraction limit. Surface plasmon resonance (SPR) sensors use TIR on a thin metal film to detect biomolecular binding with extreme sensitivity, and have become essential in biomedical research on antigen-antibody interactions.

Common misconceptions and caveats

The most common misconception is to assume that nothing exists on the far side of the interface when TIR occurs. In reality, an evanescent wave leaks across, as the yellow dashed curve in the simulator shows. The amplitude decays exponentially, but within a penetration depth d_p (a few hundred nanometers for visible light) there is a perfectly real field. Optical fiber couplers and ATR spectroscopy exist precisely to harvest this "impossible" wave. The right mental picture is not "TIR shuts off light" but "TIR drives an energy flow along the boundary."

Another frequent error is to assume that the critical angle scales linearly with the index ratio. The actual relation $\theta_c=\arcsin(n_2/n_1)$ is nonlinear because of the arcsin. Glass-to-air (n = 1.5) gives θ_c = 41.81°, but diamond-to-air (n = 2.42) drops to θ_c = 24.4°. This is exactly why diamonds sparkle: light is trapped by multiple internal TIRs. Try sliding n_1 from 1.5 to 2.4 in the simulator and watch the critical angle drop sharply.

Finally, remember that the penetration-depth formula assumes infinite plane waves. The expression $d_p=\lambda_0/(2\pi\sqrt{n_1^2\sin^2\theta_1-n_2^2})$ diverges right at the critical angle, but real laser beams have finite spot sizes and a spectrum of plane-wave components, so d_p saturates at a finite value. Real interfaces also have roughness and absorption, so the reflectance is not strictly 1 but more like 0.99999. Practical designs must also account for polarization-dependent phase shifts (s vs p) and the Goos-Hänchen lateral shift in addition to the textbook formula.