This simulator sends white light — modeled as six representative wavelengths from red to violet — into a triangular glass prism and traces each color's own refraction path, showing how wavelength-dependent refractive index spreads a single beam into a visible spectrum.
• A full ray-tracing diagram of a triangular prism with a white-light beam entering one face and six individually colored rays (red through violet) exiting the second face at slightly different angles. • Three live controls: incidence angle, prism apex angle, and a dispersion-strength slider that exaggerates or reduces the spread for teaching clarity. • Live readouts comparing the refractive index calculated for red (650 nm) light against violet (400 nm) light. • Three preset glass types: typical crown glass, higher-dispersion flint glass, and an artificially low-dispersion case for comparison.
Refractive index is not perfectly constant with wavelength — in most transparent materials it decreases slightly as wavelength increases (normal dispersion), meaning violet light refracts more than red light at the same boundary. A prism uses two refracting surfaces in sequence (entering and exiting the glass), which compounds this small per-surface difference into a clearly visible angular spread between colors by the time the light exits the second face.
Isaac Newton's 1666 prism experiments were the first clear demonstration that white light is a mixture of all visible colors, each bending by its own characteristic amount — not something the prism itself was adding to plain white light. The same wavelength-dependent refraction (combined with internal reflection inside spherical raindrops) is what produces a natural rainbow.
Refractive index depends slightly on wavelength (normal dispersion) — violet light bends more than red light at the same surface. A prism's two sequential refracting faces compound that small difference into a visibly separated spectrum.
Violet light bends the most (highest refractive index in normal dispersion), and red light bends the least, with the other spectral colors falling in between in the familiar ROYGBV order.
That white light is composed of a mixture of colors, each with its own fixed refractive behavior — the prism does not create color, it merely separates colors that were already present in the white light.
Flint glass (historically containing lead oxide) has a refractive index that varies more strongly with wavelength than ordinary crown glass, producing a wider color spread for the same prism geometry — useful in some optical instruments and undesirable (chromatic aberration) in others.