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

Related simulators

Continue with similar topics in this category — or all 50 in Optics & Light.

View category →
NewSchool

Rainbow in a Droplet

Launch Simulator

Snell in a sphere: primary (1× internal reflection ~42°) and secondary (2× ~51°, reversed spectrum); scan b/R and n.

FeaturedSchool

Refraction

Launch Simulator

Light crossing boundaries. Snell's law with angle measurements.

School

Total Internal Reflection

Launch Simulator

Find the critical angle. Fiber optics analogy.

NewSchool

CD / Grating Rainbow

Launch Simulator

Lines/mm and incidence: scalar grating orders painted as λ-colored fans.

NewSchool

Fiber Bend & TIR Loss

Launch Simulator

Curved core: outer-wall incidence vs θ_c; tight R leaks (meridional sketch).

NewSchool

Chromatic Aberration

Launch Simulator

Cauchy n(λ); thin-lens f(λ); paraxial rays R/G/B.

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

White light through a prism creating a rainbow spectrum.

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

About this model

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

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.