🧪 Soap Film Interference Lab: Thickness, Drainage & Color (2D)
Real thin-film optics: path difference 2·n·t·cosθ plus the half-wave phase flip, computed per red/green/blue band from a gravity-drained thickness profile — adjust refractive index, average thickness, drainage rate and viewing angle and watch the reflected color recompute live.
This 2D companion isolates the actual optics behind the 3D bubble's shimmer: a real thin-film-interference calculation — path difference 2·n·t·cosθ plus the single half-wave phase flip at the outer reflection — evaluated independently in the red, green and blue bands at every height of a soap film whose thickness is computed from gravity drainage rather than painted on. Slide the refractive index, average thickness, drainage rate or viewing angle and the whole color band recomputes from the formula; drag the sample-height slider to read the exact reflectance spectrum and thickness at any point, including the near-zero "black film" band that forms at the top just before a real film ruptures.
2D soap-film interference lab with real path-difference optics (2ntcosθ + half-wave phase shift) computed per RGB band from a gravity-drainage thickness profile, exposing refractive index, average thickness, drainage rate and viewing angle as live parameters.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install