loading...
running...
The science
Two reflections. Light reflects from the front surface (air to film, phase flip of half a wave) and from the back surface (film to air, no flip). Their path difference is 2 n t cos(theta_t) so with the half-wave flip, reflection is bright when 2 n t cos(theta_t) = (m + 1/2) lambda and dark when 2 n t cos(theta_t) = m lambda.
Exact reflectance. Summing all multiple reflections (Airy) with Fresnel amplitudes r (s and p polarised): R = |r(1 - e^(i d))|^2 / |1 - r^2 e^(i d)|^2, d = 4 pi n t cos(theta_t) / lambda At normal incidence the first maximum is 4r^2/(1+r^2)^2 which for n = 1.33 is only about 8%, so bubbles look pale.
Colour. The reflectance spectrum is weighted by the CIE 1931 colour-matching functions (analytic multi-lobe fit), converted to sRGB and white-balanced for an equal-energy light source.
Drainage. Gravity pulls liquid down: the film is a wedge, thinnest at the top. The top thickness decays roughly exponentially until it goes below about 10-20 nm (a black film) and the bubble bursts shortly after. Marangoni flows add the swirling turbulence.
Checks. (1) R is zero at t = lambda/(2n); (2) the first maximum equals 4r^2/(1+r^2)^2; (3) the Airy formula equals an independent characteristic-matrix calculation to 1e-9 over 200 random cases; (4) zero thickness is black; (5) a very thick film is near-white.
Simplifications. Constant refractive index (no dispersion), no surfactant layer structure, wedge plus sinusoidal swirl instead of a fluid solver, a spherical shading cue instead of true 3D reflection of the environment, and one fixed illuminant.