PhysSandbox
Classical MechanicsWaves & SoundElectricity & MagnetismOptics & LightGravity & OrbitsLabs
🌙Astronomy & The Sky🌡️Thermodynamics🌍Biophysics, Fluids & Geoscience📐Math Visualization🔧Engineering🧪Chemistry

More from Optics & Light

Other simulators in this category — or see all 44.

View category →
NewSchool

Thin-Film Interference

Wedge fringes: n, d, θ; cos²(δ/2) colors and I(λ) at mid thickness.

Launch Simulator
NewSchool

Newton’s Rings

Spherical lens on flat glass: air-film thickness fringes; optional π phase on reflection.

Launch Simulator
NewSchool

Anti-Reflection Coating

Air–film–glass at normal incidence: R(λ) from two-interface interference; quarter-wave design.

Launch Simulator
NewUniversity / research

Michelson Interferometer

I(Δ) = V cos²(πΔ/λ); tilt fringes; coherence length envelope.

Launch Simulator
NewUniversity / research

Mach–Zehnder Interferometer

Two-beam recombination; I ∝ cos²(πΔ/λ) vs one-arm OPD; schematic + fringe plot.

Launch Simulator
NewUniversity / research

Sagnac (Ring) Interferometer

Δφ ∝ Ω·A/λ for counter-propagating beams in a rotating loop — optical gyro idea.

Launch Simulator
PhysSandbox

Interactive physics, chemistry, and engineering simulators for students, teachers, and curious minds.

Physics

  • Classical Mechanics
  • Waves & Sound
  • Electricity & Magnetism

Science

  • Optics & Light
  • Gravity & Orbits
  • Astronomy & The Sky

More

  • Thermodynamics
  • Biophysics, Fluids & Geoscience
  • Math Visualization
  • Engineering
  • Chemistry

© 2026 PhysSandbox. Free interactive science simulators.

PrivacyTermsContact
Home/Optics & Light/Prism & Dispersion

Prism & Dispersion

A beam of white light, composed of many wavelengths, enters a triangular prism. The core phenomenon modeled is dispersion: the separation of light into its constituent colors. This occurs because the refractive index of the prism material, described by Snell's Law (n₁sinθ₁ = n₂sinθ₂), is not constant but depends on wavelength. Shorter wavelengths (violet, blue) are bent, or refracted, more than longer wavelengths (red, orange) upon entering and exiting the prism. The simulator visualizes this angular separation, producing a visible spectrum. It typically allows users to adjust parameters such as the prism's apex angle, its refractive index (or material type via a dispersion equation like Cauchy's formula), and the angle of incidence of the incoming light. By interacting, students learn how changes in these parameters affect the deviation and spread of the spectrum. The model simplifies real-world optics by treating light as rays (geometric optics), ignoring wave effects like diffraction and interference. It also assumes a perfectly transparent, homogeneous prism and a collimated, polychromatic light source. Through exploration, students directly engage with the principles of refraction, the relationship between wavelength and refractive index, and the fundamental reason rainbows and chromatic aberration occur.

Who it's for: High school and introductory undergraduate physics students studying geometric optics, refraction, and the wave properties of light.

Key terms

  • Dispersion
  • Refraction
  • Snell's Law
  • Refractive Index
  • Spectrum
  • Wavelength
  • Prism
  • Deviation Angle

Glass & incidence

1.5
0.004
0°

Shorter wavelengths see a higher index (normal dispersion), so violet bends more than red after two refractions.

Shortcuts

  • •Increase B for stronger rainbow spread

Measured values

n (650 nm)1.5095
n (400 nm)1.5250
Δn0.0155

How it works

White light is modeled as discrete spectral samples. Cauchy’s relation n(λ) = n₀ + B/λ² captures normal dispersion: shorter wavelengths have a higher refractive index, so each color refracts by a slightly different amount at the two prism surfaces, separating into a spectrum.

Key equations

n(λ) ≈ n₀ + B/λ² (Cauchy, λ in µm)
Snell: n₁ sin θ₁ = n₂ sin θ₂ at each interface

Frequently asked questions

Why does violet light bend more than red light in a prism?
Violet light has a shorter wavelength and higher frequency than red light. In most transparent materials, the refractive index is slightly higher for shorter wavelengths. Since the angle of refraction depends on the refractive index (via Snell's Law), the higher index for violet causes it to bend more sharply at each interface.
Is the order of colors in a prism spectrum always the same?
Yes, for typical glass or acrylic prisms, the order from least to most bent is red, orange, yellow, green, blue, indigo, violet (ROYGBIV). This sequence is determined by the material's normal dispersion, where refractive index decreases with increasing wavelength. The order would reverse in a hypothetical material exhibiting anomalous dispersion, which is not modeled in this basic simulator.
Can this simulator create a real, pure rainbow?
No. A natural rainbow is formed by refraction and internal reflection inside spherical water droplets, not a single prism. This simulator models the core dispersive effect but simplifies the geometry to a single triangular prism. It also ignores the overlapping of colors and the role of reflection in creating the full circular arc of a rainbow.
What does 'white light' mean in the simulator?
In this model, white light is treated as a composite beam containing a continuous range of visible wavelengths. The simulator typically represents this by ray-tracing several discrete, representative colors (e.g., red, green, blue). Real white light, like sunlight, is indeed a continuous spectrum, which the discrete rays approximate for visualization.