Interactive Snell's Law Simulator

Visualize how light bends at the boundary between two media. Drag the ray to explore the relationship between Angle of Incidence, Refractive Index, and Total Internal Reflection in real time.

See how light bends between materials

Pick an example, then drag the dot on the incoming ray or move the angle slider.

Air · n₁ = 1.000 Glass · n₂ = 1.520
Incoming Reflected Refracted

Measure from the dashed normal. At 0°, light meets the surface straight on.

Choose materials

Bends toward the normal

Glass has a higher refractive index than air. The refracted angle is smaller than the incoming angle.

Refracted angle
27.7°
Critical angle
None
Power reflected / transmitted
5.3% / 94.7%
Snell’s law and the critical angle

Snell’s law is n₁ sin θ₁ = n₂ sin θ₂. Measure both angles from the normal, the line perpendicular to the boundary. The angle of reflection always equals the angle of incidence.

When light travels from a higher to a lower refractive index, the critical angle is θc = arcsin(n₂/n₁). Try glass to air. At 30° a ray still enters the air, but at 50° the angle exceeds the critical value of about 41.14° and all incident power is reflected.

Power percentages use the Fresnel equations for unpolarized light at a flat, lossless interface. The material indices are illustrative and can vary with wavelength and composition. See OpenStax on total internal reflection.

📡
API Access & Educational Use

This Snell's Law simulator is available for integration into university physics courses, photonics training platforms, and educational publishing tools via API. Contact our team at contact@ephotonics.com for custom material libraries, multi-layer interface simulations, and white-label deployments for academic or industrial use.

Understanding Snell's Law and Light Refraction

The simulator above demonstrates one of the most fundamental principles in optics: Snell's Law of Refraction. When a ray of light passes from one transparent medium into another such as from air into glass or water, it changes direction at the interface. This bending of light is called refraction, and it is the physical mechanism behind lenses, optical fibers, cameras, and virtually every photonic device in use today.

The degree of bending is governed by the refractive index (n) of each material — a dimensionless number that describes how much slower light travels through that medium compared to a vacuum. The higher the refractive index, the more the light slows down and bends toward the normal (the dashed vertical line in the simulator).

n1 · sin(θ1) = n2 · sin(θ2)

Where n1 and n2 are the refractive indices of the two media, θ1 is the angle of incidence (the incoming ray measured from the normal), and θ2 is the angle of refraction (the transmitted ray). Because the speed of light in a medium is fixed by its refractive index, this relationship is exact and predictable — making it the foundation of all lens and optical fiber design.

Total Internal Reflection — When Light Cannot Escape

Drag the incident ray to a steep angle while placing a denser medium (higher n) on top and a less dense medium below, for example, glass over air. As the angle increases, you will reach a point where the refracted ray disappears entirely and the light is reflected back into the denser medium. This is Total Internal Reflection (TIR), and it occurs whenever the angle of incidence exceeds the critical angle (θc).

θc = arcsin(n2 / n1)

Total Internal Reflection is not a failure of optics, it is one of the most useful phenomena in photonics. It is the principle that makes optical fiber communication possible: laser light is injected into a glass core surrounded by a lower-index cladding, and TIR traps the light inside, allowing it to travel kilometers with minimal loss. It is also used in laser beam steering prisms, endoscopes, and retroreflectors.

Refractive Index of Common Optical Materials

The four preset materials in the simulator cover the practical range used in optics and photonics engineering:

  • Air (n = 1.00): The reference medium. Light travels at its maximum speed (~3×10⁸ m/s). Used as the input medium in almost all free-space optical systems.
  • Water (n = 1.33): Relevant in biological imaging, underwater sensing, and aqueous-medium fiber coupling. Its refractive index varies slightly with wavelength, causing chromatic dispersion.
  • Borosilicate Glass (n = 1.52): The standard for optical lenses, windows, and fiber preforms. The most common material in laboratory and industrial photonics setups.
  • Diamond (n = 2.42): The highest refractive index of any natural transparent material. Its extreme light-bending ability and very small critical angle (~24°) produce the characteristic brilliance of cut gemstones and make it valuable for high-power laser optics.

Consult with an Expert

Get a formal quote

Get a formal quote