Optics bench · specimen 001 initialising gpu…

LUMEN

A field study of one ray of light and one piece of glass. Five phenomena, computed on your GPU as you read - nothing on this page is a video.

Scroll to bend the light Jul 2026
01Refractionn₁ sin θ₁ = n₂ sin θ₂
Phenomenon · the bend

Light changes its mind at the surface.

The moment light crosses into glass it slows to about two-thirds of its vacuum speed, and its path bends to account for the loss. fixes the new angle exactly. Everything else on this bench follows from that single negotiation at the boundary.

n₁ air 1.000 n₂ glass 1.458 θ₂ @ 35° 23.2°
02Causticsenvelope of refracted rays
Phenomenon · the landing

Bent light has to land somewhere.

A curved surface bends every ray by a different amount, and the floor collects the result: bright envelopes where paths pile up, shadow where they were stolen from. The dancing net at the bottom of a swimming pool is this figure, drawn by the sun through waves.

envelope gain 0.21× focus under specimen
03Dispersionn = n(λ)
Phenomenon · the sorting

White light was never one thing.

The bend depends on wavelength - violet turns harder than red. Give the glass an edge and it sorts white light into a spectrum, ranked by how hard each color brakes. The of this specimen rates how widely it spreads them.

Δn (F−C) 0.0071 ν_d 64.17
04Interference2nt cos θ = mλ
Phenomenon · the argument

Thin enough, glass plays light against itself.

At a few hundred nanometers, the reflection off the top of a film meets the reflection off the bottom, and the two waves add or cancel color by color. Soap bubbles and oil slicks get their rainbows here - not from pigment, from arithmetic.

film - nm order m 1–3
05AbsorptionI = I₀ e^(−σℓ)
Phenomenon · the toll

The glass keeps a toll.

No medium is perfectly honest. Each millimeter absorbs a fixed fraction of what enters it - - and the color of deep glass is simply the wavelengths it failed to steal. Look through the edge of any windowpane to see the debt.

transmittance 100% path ℓ 0.0 mm
06 · Transmission

What leaves the glass is a record of the glass.

Bent, focused, sorted, phased, taxed - the ray that exits carries every event as color and direction. That is all an image is: light, annotated by matter.

Built as one HTML file. The specimen is a signed-distance field, sphere-traced in a WGSL fragment shader on WebGPU - per-wavelength refraction, thin-film interference, Beer–Lambert extinction - with the same scene carried by WebGL2 where WebGPU hasn't landed. The page around it is CSS: scroll-driven timelines run the chapters, anchor positioning pins the footnotes, scroll-state queries dress the sticky headers, and the corners are true squircles. No frameworks, no images, no video. There is a write-up of how it was built.

Full instrument panel
  • WebGPU / WGSLraymarched SDF morph, live uniforms
  • WebGL2 GLSL ES 3.0same scene, fallback path
  • scroll() / view() timelinesrail, reveals, chapter state
  • timeline-scoperail reads chapter timelines
  • scroll-state(stuck)sticky headers self-style
  • anchor positioning + popoverfootnotes, with @starting-style
  • corner-shape: squircleevery rounded box on this page
  • text-box trimcap-height-true display type
  • oklch + relative colorwhole palette, spectrum in longer-hue
  • interpolate-sizethis panel animating to auto
  • @property + linear() springstyped scroll variables, spring easing
  • reduced motion / transparencyboth respected
Snell, 1621 · Ibn Sahl, 984 n₁ sin θ₁ = n₂ sin θ₂ - the refraction law tying the angle of the bend to the two refractive indices at the boundary.
Ernst Abbe, c. 1870 ν_d = (n_d − 1) / (n_F − n_C). Higher numbers disperse less: crown glass ≈ 64, dense flint ≈ 30, diamond ≈ 55 - with fire to spare.
Bouguer 1729 · Lambert 1760 · Beer 1852 I = I₀ · e^(−σℓ) - intensity decays exponentially with path length ℓ through an absorbing medium of extinction σ.