NewVersion 1.2

Reflection & Refraction

Shine rays at mirrors, blocks, and prisms: find where a mirror’s image really is, bend light with Snell’s law, trap it in a fiber by total internal reflection, and split sunlight into a spectrum and a rainbow.

A laser beam bending into a glass block and out again on an optical table, with the angles from the normal labeled, Snell’s law written out with its numbers, and faint reflected rays.

About this simulation

Every ray in this lab is traced by one two-dimensional engine: straight lines in each medium, the law of reflection at mirrors, Snell’s law in vector form at every surface, and Fresnel’s equations to share the light between the reflected and transmitted rays, with total internal reflection beyond the critical angle and dispersion from published Sellmeier formulas. A guided walkthrough at two levels follows OpenStax University Physics Volume 3, Chapter 1: the law of reflection, where a plane mirror’s image is and how tall a mirror must be, n = c/v, Snell’s law, light leaving water, total internal reflection, the critical angle, light pipes, prisms, and the rainbow; the Advanced track adds Fermat’s least time, Snell’s law as vectors, how much light reflects and the steep approach to the critical angle, the evanescent wave and frustrated total internal reflection, Cauchy’s formula, minimum deviation, angular dispersion, Descartes’s theory of the primary and secondary bows and Alexander’s dark band, modal dispersion in fibers, and the mirage. The Sandbox is an optical table with lasers, ray boxes, and point sources in one color, white light, or lamp lines, and mirrors, blocks, prisms, a D-block, rods, and screens to drag and turn, with Snell’s law read at any surface and eight presets from a periscope to a diamond and a vanishing glass rod. A Snell Bench reproduces the semicircular-block lab with readings that scatter like real ones and fits for the index by two methods; Fiber Optics bends a light pipe until it leaks and sends a pulse down kilometers of step-index and graded-index fiber; Prisms & Rainbows has a prism spectrometer, Newton’s experiments, the ice-crystal halos, one raindrop ray by ray with its far-field histogram, and the bows in the sky.

What you'll learn

  • Apply the law of reflection with angles from the normal, and locate a plane mirror’s virtual image for any observer.
  • Use n = c/v and Snell’s law to predict how light bends entering and leaving water, glass, and diamond.
  • Explain when total internal reflection can happen, compute the critical angle, and relate it to fibers, binocular prisms, and diamonds.
  • Explain dispersion with prisms, and the rainbow’s 42° and 51° bows with their color order, from refraction and reflection inside raindrops.

What you can do

  • Guided walkthroughStep-by-step, in Intro and Advanced tracks.
  • SandboxEvery control of the model, to explore freely.
  • Virtual labA realistic experiment with measurement noise and data analysis.
  • Concept checksQuestions about ideas and vocabulary, with no calculating.
  • PredictionCommit to a prediction, then see the result.
  • Classroom demoProjector mode and recordable clips for slides.
  • Works offlineA single downloadable file, verified to run without a network.

Before you start

  • Angles, sines, and inverse sines
  • The idea of light as a wave with a speed, frequency, and wavelength
  • For the Advanced track: vectors, derivatives, and the idea of a stationary point

Run or download

Run it in your browser

Nothing to install and no account. Works on laptops, Chromebooks, tablets, and phones.

Launch Reflection & Refraction

Download for offline use

One HTML file (966 kB) that opens in any modern browser with no network: for rooms with unreliable Wi-Fi, or to keep a copy.

Download the file
File details and checksum
File
reflection-refraction-v1.2.html
Version
1.2, released November 15, 2026
Build
9486469
Size
988,676 bytes
SHA-256
3034800b131f79c1fde4d171910279c305e0016e876dfd2b2bd62a3daaebdcb8
Offline
Checked to run with all network access blocked.

The model and its limits

What the model assumes

  • Two-dimensional geometric optics: straight rays in uniform media, reflection at mirrors, Snell’s law at every surface, and curved rays in graded media by the ray equation.
  • Fresnel’s equations share each ray’s power between reflected and transmitted rays for unpolarized light; beyond the critical angle the reflection is total; mirrors reflect all the light.
  • Indices relative to air (air = 1.000) from published dispersion formulas; an Advanced option uses real air (1.00028) with every index relative to vacuum, which leaves every angle unchanged.
  • White light is 15 equal-power wavelengths from 400 to 700 nm; lamps are sodium, mercury, and hydrogen lines.
  • Frustrated total internal reflection uses the closed form for one gap, labeled as wave optics.
  • Fibers are slabs (meridional rays); the telecom fiber’s delays come from traced rays and fused silica’s dispersion.

What it leaves out

  • No diffraction or interference: supernumerary bows, the glory, and coronas are left out.
  • Polarization is carried but not shown; s and p light and Brewster’s angle are in the Polarization Lab.
  • No skew rays or three-dimensional effects; the rainbow is drawn from its two-dimensional section.
  • No lenses or curved mirrors (a later optics sim), no birefringence, and absorption and scattering only where stated.
  • Material indices are tabulated values at room temperature; the attenuation chart is illustrative.

Cite this simulation

APA 7

Meier, D. (2026). Reflection & Refraction (Version 1.2) [Computer simulation]. Glidepath Science. https://glidepathscience.org/simulations/reflection-refraction/

MLA 9

Meier, David. Reflection & Refraction. Version 1.2, Glidepath Science, 2026, glidepathscience.org/simulations/reflection-refraction/.

AIP

D. Meier, Reflection & Refraction, version 1.2 (Glidepath Science, 2026), https://glidepathscience.org/simulations/reflection-refraction/.

BibTeX

@misc{meier2026reflectionrefraction,
  author       = {Meier, David},
  title        = {{Reflection & Refraction}},
  year         = {2026},
  publisher    = {Glidepath Science},
  version      = {1.2},
  note         = {Interactive simulation, version 1.2},
  howpublished = {\url{https://glidepathscience.org/simulations/reflection-refraction/}},
  url          = {https://glidepathscience.org/simulations/reflection-refraction/}
}

Credits and license

Created by Dr. David Meier, Glidepath Science.

Based on: OpenStax, University Physics Volume 3, by Samuel J. Ling, Jeff Sanny and William Moebs: Chapter 1, “The Nature of Light” (§1.1–1.5, with the wavefronts of §1.6), and §2.1, “Images Formed by Plane Mirrors,” an open textbook licensed CC BY-NC-SA 4.0 (openstax.org). The Intro track follows its order of topics and its notation: n = c/v, angles measured from the normal, θ_r = θ_i, n₁ sin θ₁ = n₂ sin θ₂, and θ_c = sin⁻¹(n₂/n₁). The wording, numbers, figures, and simulations are the sim’s own. No endorsement by OpenStax or the authors is implied.

Licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0). You may share and adapt it for noncommercial purposes, such as teaching, with credit and under the same license. Licensing and reuse

AI tools (Claude, from Anthropic, and ChatGPT, from OpenAI) were used in developing Glidepath Science and its simulations. Dr. David Meier reviewed, edited, and modified every release version.