Refracting the Milky Way through a glass prism (Snell's law at each face)

A glass tetrahedron turns under a long-exposure Milky Way above a winter coast, and the starlight leaves it as a rainbow on the still water.

How it’s built, briefly:

  • The glass is a MeshPhysicalMaterial (transmission 1, ior 1.5, dispersion 0.4) in front of a copy of the exact patch of sky it covers, lit by a PMREM “dark studio” of eleven softbox planes.
  • The rounded body is the convex hull of small spheres at the corners of a smaller core, with every normal recomputed from the nearest core face, so the faces stay flat and each edge carries one clean highlight.
  • The rainbow is traced per colour in JS: enter at the first face (vector Snell), cross, leave at the next face. Each of the six bands has its own index (1.46 + 0.045 i), wider than real glass so the fan reads.
  • The sky is computed, not a photo: a Milky Way glow worked out cell by cell from noise, painted in a worker on an OffscreenCanvas and kept in IndexedDB.

Live, phones too, free: Prismtect: a prism that refracts the Milky Way
Happy to go deeper on any part.

I’m not quite sure of the terminology, but refraction “bends” the light direction. I do not see refraction in your model. Splitting the white light into a rainbow is call dispersion (and it is a kind of wavelength-based refraction).