🫧 Soap Bubble Thin-Film Interference (2D)
A physically modelled soap film: drag film thickness, soap concentration, gravity and bubble radius and watch real thin-film interference colours, Young–Laplace pressure and gravity-driven drainage play out until the film thins to a Newton black film and pops.
This 2D companion strips the studio-lit 3D scene down to the physics driving it: a real thin-film interference model computes the reflected colour at every point on the film from its thickness in nanometres and the soap solution's refractive index, so the swirling colour bands you see are the same physics behind a real soap film, not a decorative shader loop. Four sliders — initial film thickness, soap concentration, gravity strength and bubble radius — feed directly into the model: soap concentration sets the surface tension via γ = 45 − 0.20·concentration (mN/m), which in turn sets both how fast the film thins and the Young–Laplace internal pressure ΔP = 4γ/r. Gravity pulls liquid down through the film over time, thinning the top faster than the bottom — watch the colour bands drift and the top edge fade toward black as the film approaches the Newton black-film thickness of a few nanometres, at which point it pops and a fresh film forms.
2D soap-bubble lab: adjustable film thickness, soap concentration, gravity and radius drive a real thin-film interference model — watch the film drain, its colour bands shift, and it pop at the Newton black-film limit.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install