返回资讯中心
外部精选
软件工程
#开发者实时流

The Colors of a Soap Film

A soap film is a sheet of water between two layers of soap molecules, often thinner than a micrometer. A vertical film drains under gravity and is thinner at the top, so in white light it shows bands of color ordered by…

Hacker News 最新gregsadetsky2026/10/24 · 13 天前30 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

A soap film is a sheet of water between two layers of soap molecules, often thinner than a micrometer. A vertical film drains under gravity and is thinner at the top, so in white light it shows bands of color ordered by thickness. Newton watched them on bubbles kept under a glass cover (Opticks, Book II, Part I, Observation 17): colored rings formed at the top, widened and moved down as the water drained, and a black spot grew at the top before the bubble broke.

The color at thickness ddd follows from two ingredients: the fraction of light the film reflects at each wavelength λ\lambdaλ, and the three color-matching functions that the CIE (the International Commission on Illumination) uses to reduce a spectrum to a color. The first is a single cosine in 1/λ1/\lambda1/λ, so the color is a fixed white minus the cosine transform of the color-matching functions, evaluated at 2nd2nd2nd, the extra optical path traveled by light reflected from the film’s back surface, where nnn is the refractive index of water. The computed colors agree with the table of thicknesses that Newton compiled for them.

Consider light of wavelength λ\lambdaλ that travels normal to the film, perpendicular to its two surfaces. Two beams return toward the eye. One is reflected by the front surface. The other crosses the film, is reflected by the back surface, and crosses the film again.

Light is an electromagnetic wave: an electric field and a magnetic field that oscillate together as the wave travels. The amplitude of a beam is the size of its electric field’s oscillation, and the brightness of the beam is proportional to the square of its amplitude. In the figure, each beam is labeled with its amplitude as a multiple of the incoming beam’s amplitude.

d

1

r

t

−rt −rtt′ ≈ −r air, index 1 front surface water, index n back surface air

front-surface wave back-surface wave their sum, the reflected light

τ direction of travel →

All the beams in the figure travel along the same line, normal to the film. They are drawn side by side so that each one can be labeled. The right half shows the two returning waves at one instant. The back-surface wave is the front-surface wave turned upside down, and it trails the front-surface wave by a distance τ\tauτ, derived below. The light that reaches the eye is the sum of the two waves.

How much each surface reflects. When light travels normal to a surface, its electric and magnetic fields both lie parallel to the surface. In a medium of refractive index nnn, the amplitude of the magnetic field is proportional to nnn times the amplitude of the electric field. Suppose a beam of amplitude 111 crosses a boundary from a medium of index n1n_1n1​ into a medium of index n2n_2n2​. It splits into a reflected beam of amplitude rrr and a transmitted beam of amplitude ttt. Maxwell’s equations require each field to take the same value on both sides of the boundary. For the electric field, this condition reads 1+r=t1 + r = t1+r=t. The reflected beam travels in the opposite direction, so its magnetic field points the opposite way, and the condition for the magnetic field reads n1(1−r)=n2 tn_1(1 - r) = n_2,tn1​(1−r)=n2​t. Solving these two equations gives the Fresnel coefficients for normal incidence,

In the soap film, the index is 111 for air and nnn for water. At the front surface, light passes from air into water, so r=(1−n)/(1+n)r = (1-n)/(1+n)r=(1−n)/(1+n) and t=2/(1+n)t = 2/(1+n)t=2/(1+n). For n=1.33n = 1.33n=1.33, r=−0.142r = -0.142r=−0.142. At the back surface, light passes from water into air. The two indices trade places, and the reflection coefficient becomes (n−1)/(n+1)=−r(n-1)/(n+1) = -r(n−1)/(n+1)=−r. The two reflections therefore have opposite signs. On its way out, the back-surface beam passes through the front surface from water into air, with transmission coefficient t′=2n/(1+n)t' = 2n/(1+n)t′=2n/(1+n). This beam is transmitted, reflected and transmitted again, so it returns with amplitude

The last step uses (1+n)2−(1−n)2=4n(1+n)^2 - (1-n)^2 = 4n(1+n)2−(1−n)2=4n. For water, 1−r2=0.981 - r^2 = 0.981−r2=0.98. From here on I approximate 0.98≈10.98 \approx 10.98≈1, which changes the back-surface beam’s amplitude by 2%2%2%, so the two returning beams have amplitudes rrr and −r-r−r.

How far the second beam trails the first. The back-surface beam travels an extra distance 2d2d2d inside the water, where the wavelength shortens to λ/n\lambda/nλ/n. It therefore falls behind the front-surface beam by 2d/(λ/n)=τ/λ2d/(\lambda/n) = \tau/\lambda2d/(λ/n)=τ/λ wavelengths, where

is the optical path difference between the two beams. In air, where the wavelength is λ\lambdaλ, this is a distance τ\tauτ, as in the figure. Each wavelength of delay is one full cycle of the oscillation, so the back-surface wave is shifted in its cycle by the angle φ=2πτ/λ\varphi = 2\pi\tau/\lambdaφ=2πτ/λ. This angle is called the phase difference.

Two waves with different phases are added by writing each one as a complex number whose magnitude is the amplitude and whose angle is the phase, as in the Euler’s identity post. A shift by the angle φ\varphiφ multiplies the complex number by eiφe^{i\varphi}eiφ. The light reflected by the film therefore has amplitude

The reflectance RRR is the fraction of the incoming light that the film reflects. Brightness is proportional to the square of the amplitude, so RRR is the squared magnitude of this complex number. Since ∣1−eiφ∣2=(1−cos⁡φ)2+sin⁡2φ=2−2cos⁡φ|1 - e^{i\varphi}|^2 = (1 - \cos\varphi)^2 + \sin^2\varphi = 2 - 2\cos\varphi∣1−eiφ∣2=(1−cosφ)2+sin2φ=2−2cosφ,

Taking n=1.33n = 1.33n=1.33 constant across the visible band, r2=0.0201r^2 = 0.0201r2=0.0201, so RRR lies between 000 and 4r2=8.0%4r^2 = 8.0%4r2=8.0%. In the wavenumber σ=1/λ\sigma = 1/\lambdaσ=1/λ, R=2r2(1−cos⁡2πστ)R = 2r^2(1 - \cos 2\pi\sigma\tau)R=2r2(1−cos2πστ) is a single cosine with period 1/τ1/\tau1/τ. Light can also bounce back and forth inside the film several times before it leaves. Summing all of these reflections gives the exact Airy formula (Born and Wolf, §7.6). Its higher harmonics cos⁡(2πkστ)\cos(2\pi k\sigma\tau)cos(2πkστ), for integers k≥2k \ge 2k≥2, shrink by a factor r2≈0.02r^2 \approx 0.02r2≈0.02 from each kkk to the next, and the two-beam formula stays within about 4%4%4% of it.

For the CIE 1931 standard observer, light with spectral power P(λ)P(\lambda)P(λ) is described by three tristimulus values

where xˉ,yˉ,zˉ\bar x, \bar y, \bar zxˉ,yˉ​,zˉ are the tabulated color-matching functions. Two lights with the same (X,Y,Z)(X, Y, Z)(X,Y,Z) look identical to the standard observer, and since yˉ\bar yyˉ​ is the eye’s sensitivity to brightness, YYY is the luminance. Light reflected by the film has P=SRP = SRP=SR for an illuminant with spectrum SSS. I use D65, the CIE’s standard representation of average daylight (Newton viewed his bubbles “by Reflexion of the Skies when of a white Colour”), normalized so that a perfect reflector has the white point W=(0.950, 1, 1.089)W = (0.950,\ 1,\ 1.089)W=(0.950, 1, 1.089). The sRGB standard specifies the 3×33 \times 33×3 matrix and the encoding curve that take (X,Y,Z)(X, Y, Z)(X,Y,Z) to the color a screen displays.

Substitute RRR into the three integrals and change variables to σ=1/λ\sigma = 1/\lambdaσ=1/λ. Define three weight curves on the wavenumber axis by

and wyw_ywy​, wzw_zwz​ likewise, so that their integrals are the three components of WWW. With w=(wx,wy,wz)w = (w_x, w_y, w_z)w=(wx​,wy​,wz​), the tristimulus values of the film are

​XYZ​​(d)=2r2(W−c^(τ)),c^(τ)=∫w(σ)cos(2πστ)dσ,τ=2nd. The vector c^(τ)\hat c(\tau)c^(τ) is the cosine transform (the real part of the Fourier transform) of the three weight curves, evaluated at the path difference.

The black film. At d=0d = 0d=0 the cosine equals 111 at every wavelength, so c^(0)=W\hat c(0) = Wc^(0)=W and the film reflects nothing: the two reflections cancel exactly. For small ddd, R(λ)≈4r2(πτ/λ)2R(\lambda) \approx 4r^2(\pi\tau/\lambda)^2R(λ)≈4r2(πτ/λ)2 is proportional to 1/λ21/\lambda^21/λ2, so the first light reflected by a thin film is weighted toward short wavelengths. Its chromaticity, in the CIE coordinates (x,y)=(X,Y)/(X+Y+Z)(x, y) = (X, Y)/(X + Y + Z)(x,y)=(X,Y)/(X+Y+Z), is (0.266,0.281)(0.266, 0.281)(0.266,0.281), bluer than the white point at (0.313,0.329)(0.313, 0.329)(0.313,0.329). This bluish gray is the faint blue that Newton lists right after black. At d=10d = 10d=10 nm the film reflects 0.18%0.18%0.18% of the light, less than a tenth of the 2%2%2% reflected by a single water surface but not zero, and Newton could see “the Images of some things (as of a Candle or the Sun) very faintly reflected” from the black spot.

The orders. The luminance Y=2r2(1−c^y(τ))Y = 2r^2\big(1 - \hat c_y(\tau)\big)Y=2r2(1−c^y​(τ)) is smallest when the wavelengths at the center of wyw_ywy​ are extinguished, that is, when τ\tauτ is a multiple of λˉ=554\bar\lambda = 554λˉ=554 nm, the reciprocal of the mean wavenumber of wyw_ywy​. The computed minima are at d=207d = 207d=207, 416416416, 626626626 and 837837837 nm, spaced by λˉ/2n=208\bar\lambda/2n = 208λˉ/2n=208 nm. With the middle of the spectrum removed, red and blue light remain, and these purple bands separate the orders: the second and third orders run through blue, green, yellow and red, and from the fourth order on, greens and pinks alternate and grow paler.

The widget evaluates the formula from the CIE tables at 555 nm steps: the reflectance with the products SxˉS\bar xSxˉ, SyˉS\bar ySyˉ​, SzˉS\bar zSzˉ dashed, the chromaticity diagram with the film’s path up to the current ddd, and the color for every ddd up to 2 μ2\ \mu2 μm.

Newton's table (water)

Colors are drawn at 1/(4r²) times the true reflectance, so the brightest film shows as full white. The most saturated blues and greens lie outside sRGB and are clipped.

In the first order the peak of RRR, at λ=2τ\lambda = 2\tauλ=2τ, moves from the ultraviolet into the visible band. At d=104d = 104d=104 nm it sits at 553553553 nm, RRR stays above half its maximum across the band, and the film is white. The zero of RRR at λ=τ\lambda = \tauλ=τ enters the band at d=143d = 143d=143 nm, which turns the film yellow and then red, and reaches the green at d=208d = 208d=208 nm. The chromaticity path goes once around the white point in each of the first three orders. After that, it swings between the green and pink sides of the white point, at a distance that shrinks in every order after the second.

As ddd grows, c^(τ)→0\hat c(\tau) \to 0c^(τ)→0 by the Riemann–Lebesgue lemma (the Fourier transform of an integrable function tends to zero at infinity), so a thick film reflects the illuminant’s own color at 2r2≈4%2r^2 \approx 4%2r2≈4%, the reflectance of two water surfaces whose reflections add without interfering. The cosine in RRR has period 1/τ1/\tau1/τ in σ\sigmaσ, and the visible band holds τ (1/380−1/780) nm−1\tau,(1/380 - 1/780)\ \text{nm}^{-1}τ(1/380−1/780) nm−1 of its periods: 1.81.81.8 at d=0.5 μd = 0.5\ \mud=0.5 μm and 5.45.45.4 at d=1.5 μd = 1.5\ \mud=1.5 μm. A weight curve that spans several periods averages the cosine to nearly zero.

The widths of the weight curves set the rate of decay. Replacing wyw_ywy​ by a Gaussian with the same mean σˉ=1/λˉ\bar\sigma = 1/\bar\lambdaσˉ=1/λˉ and standard deviation sss gives

the oscillation that produces the orders, under a Gaussian envelope. For the tabulated D65 and yˉ\bar yyˉ​, s=0.136 μm−1s = 0.136\ \mu\text{m}^{-1}s=0.136 μm−1, and the envelope falls to 1/e1/e1/e at τ=1/(2 πs)=1.65 μ\tau = 1/(\sqrt{2},\pi s) = 1.65\ \muτ=1/(2​πs)=1.65 μm, a thickness of 0.62 μ0.62\ \mu0.62 μm. The modulus of the exact transform of the tabulated curve stays within 0.0320.0320.032 of this envelope up to d=1.2 μd = 1.2\ \mud=1.2 μm. The transform of a narrower weight curve would decay more slowly. This is the width trade-off of the Fourier transform from the Heisenberg post. Computed from the formula, the chromaticity stays within 0.030.030.03 of the white point fo

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →