Optics ray tracing · physical glass

Glass & Light:

Newton’s prism experiment, re-run in a dark room inside the page. A white beam passes through glass and fans into a spectrum, traced live with Snell’s law and a separate refractive index for every colour, so dragging the prism sweeps the rainbow. A second prism folds it back into white, then glass objects show dispersion and soap-bubble iridescence in physically based rendering.

  • Three.js
  • GLSL
  • Optics
  • Web Audio