← Back to Prism Riddle

Total Internal Reflection Simulator: Critical Angle and Light Guides

Guide light through glass using the actual interface conditions. Compare a turning beam, leakage and trapped rays while measuring the output power.

Try the light-guide experiment

Free, live optical simulation. Change one setting and observe the result.

The controls and explanation below describe this experiment. A browser with Canvas support is required to draw the rays.

Preparing the optical trace…

Open this setup in Free lab →

The emitter is inside nondispersive glass surrounded by air. Interfaces use Fresnel reflection/transmission and TIR phase. This is a 2D bar or beveled guide, not a full optical-fiber mode simulation.

What is total internal reflection?

Total internal reflection can occur when light travels from a higher refractive index to a lower one. Above the critical angle, measured from the interface normal inside the higher-index material, there is no propagating transmitted ray. For a glass-to-air interface, the critical angle satisfies sin θc = 1/n.

At n = 1.5 the critical angle is approximately 41.81°. An internal incidence angle of 45° is above that threshold. At n = 1.3 the threshold is approximately 50.28°, so the same 45° incidence is not enough. Reference: OpenStax on total internal reflection.

Use the glass-guide experiment

  1. Start with the 45° beveled elbow, index 1.5 and internal ray angle 0°.
  2. Observe the beam turn upward at the diagonal glass-air boundary.
  3. Lower the index toward 1.3 and watch light escape through the bevel.
  4. Select the straight bar and vary the internal ray angle to compare side reflection, leakage and trapped paths.
  5. Read the absorbing output detector, then move the whole setup into Free lab if you want to change its geometry.

The lamp in this preset is deliberately inside the glass. That lets you vary internal ray directions directly. If you place a source outside the guide instead, its entry angle is first changed by refraction. External launch angle and internal incidence angle are not interchangeable.

Why is the output below 100%?

Total internal reflection at the bevel does not make every other interface lossless. At an ordinary glass-air end face, some power is reflected and some is transmitted according to the Fresnel coefficients. At normal incidence between index 1.5 and air, the reflected fraction is 4% and the transmitted fraction is 96%.

With the default embedded lamp and ideal elbow, the output detector receives approximately 0.9615 power units after the small returning contributions are included. The rest leaves through the other opening; the glass itself is modeled as nonabsorbing. The detector then absorbs the power it measures.

Below the critical angle, the interface still reflects a fraction of the light. A leaking guide can therefore show a weaker reflected branch as well as an escaping transmitted branch. This implementation computes those branches separately rather than switching abruptly between perfect transmission and perfect reflection.

Straight glass bar and beveled elbow

The straight guide has a rectangular boundary. The elbow uses an explicit L-shaped polygon with a 45° outer bevel. The turn comes from reflection at that boundary; the program does not teleport a ray to an exit or force it to follow a decorative tube.

For an axial input to the elbow, the bevel is encountered at 45°. If the internal ray angle changes, it can encounter a side wall before reaching the bevel. Follow the actual drawn path rather than assuming every hit still has the default angle.

Can light remain trapped?

Yes, in an ideal lossless geometric model some rays can satisfy total internal reflection at every boundary they encounter. The straight rectangular guide near a 45° internal direction at n = 1.5 provides such a case. The finite tracer reports unresolved power when it reaches its path limit; it does not invent an escape or mark the result complete.

Real materials have absorption, scattering, surface imperfections and finite geometry outside this two-dimensional slice. Our trace limit is a computational stopping condition, not a physical timer for how long trapped light survives.

What happens to polarization?

The glass interfaces use separate s and p Fresnel coefficients. Their different amplitudes can change polarization, and total internal reflection can introduce a relative phase that makes linearly polarized input elliptical. The simulation carries normalized Stokes state for each ray, and the spectral detector reports a polarization degree in the local s/p basis. Independent paths add intensity, not coherent fields.

The guide index is constant across the sampled wavelengths, and its exterior is air. This is not a calculation of optical-fiber modes, cladding confinement, evanescent coupling, bending loss or a complete electromagnetic field. Use the polarization experiment for controlled normal-incidence comparisons and the detector guide for readout limits.

Frequently asked questions

Is 45° always enough for total internal reflection?

No. The critical angle depends on the two refractive indices. A 45° glass-air hit is above critical for n = 1.5 but below critical for n = 1.3.

Is the lamp inside or outside the glass?

The supplied preset places it inside the guide so the internal direction can be controlled directly. Free lab lets you move it outside.

Why does a TIR guide still return some light at its exit?

An end face below the critical angle has Fresnel reflection as well as transmission. TIR at one surface does not eliminate reflection at other surfaces.

Why does the straight guide sometimes show a trace warning?

A lossless ideal ray can remain trapped. When the finite path limit is reached, remaining power is reported as unresolved rather than treated as a completed measurement.

Is this a full fiber-optic simulator?

No. It is a two-dimensional nondispersive glass bar or beveled guide in air. Waveguide modes, cladding and evanescent effects are not included.

Play the first three chambers free →