Skip to main content
Sandbox Physics

Optics 043 · Interference, coherence, cavities, and metrology

Thin-Film Color Studio

A depth-magnified cutaway couples an editable single layer or repeated bilayer stack to coherent s/p transfer matrices, fixed-exposure D65 colour, a full power spectrum and an angle–wavelength reflection atlas.

Interactive modelThin-Film Color Studio
Shared wavelength / reflected and transmitted power λp,Rp,Tp\lambda_p,R_p,T_p0.500.50
D65 luminance fractions / first-layer round-trip phase YR,YT,δHY_R,Y_T,\delta_H50%50\%
Actual layer count / total thickness / spectral energy closure Nℓ,D,εEN_\ell,D,\varepsilon_E0.00π0.00\pi
Model regimevalid model regime\text{valid model regime}

CONTINUE EXPLORING

One film, many colours

Separate a changing thickness pattern from the spectrum reflected by one local layer.

Physics tutorial

Audit the physics of Thin-Film Color Studio

BackgroundA transparent film reflects at every boundary. Its forward and backward waves accumulate the round-trip phase δj=4πnjdjcos⁡θjλ\delta_j=\frac{4\pi n_jd_j\cos\theta_j}{\lambda}. Interface reflection signs are essential: a flat soap film with air on both sides goes dark in reflection as thickness vanishes. The bright transmitted field remains. This Lab solves all internal bounces through boundary matching, rather than summing two unsigned rays.

Why it mattersHow do physical layer thickness, angle and polarization turn one spectrum into a reflected colour?

Start with the essentials

Focus question
How do physical layer thickness, angle and polarization turn one spectrum into a reflected colour?
One-sentence intuition
A lossless coating redistributes light between two exits: R(λ)+T(λ)=1R(\lambda)+T(\lambda)=1. Anti-reflection is not absorption. The exact quarter-wave matching layer cancels one design wavelength at normal incidence, not the entire visible spectrum. Repeated high/low index pairs instead create a reflective band; tilting changes optical phase and separates s from p.

Core mathematical model

Snell geometry and layer phase

njsin⁡θj=sin⁡θ0,βj=2πnjdjcos⁡θjλ,δj=2βjn_j\sin\theta_j=\sin\theta_0,\qquad\beta_j=\frac{2\pi n_jd_j\cos\theta_j}{\lambda},\qquad\delta_j=2\beta_j

The angle is measured from the normal. The cosine, not the longer geometric zigzag length by itself, determines the relative phase at a common outgoing wavefront. Indices are constant real values; changing index never secretly retunes thickness.

Tangential-field characteristic matrix

Mj=(cos⁡βj−isin⁡βj/qj−iqjsin⁡βjcos⁡βj),qj(s)=njcos⁡θj,qj(p)=nj/cos⁡θjM_j=\begin{pmatrix}\cos\beta_j&-i\sin\beta_j/q_j\\-iq_j\sin\beta_j&\cos\beta_j\end{pmatrix},\quad q_j^{(s)}=n_j\cos\theta_j,\quad q_j^{(p)}=n_j/\cos\theta_j

Using the negative-exponent harmonic time convention, the matrix maps rear tangential electric/magnetic fields to front fields. Multiply in physical front-to-back order. The tangential p-amplitude convention differs in sign from a full-vector convention; reflectance agrees.

Two independently calculated power exits

M=∏jMj,B=M11+qsM12,C=M21+qsM22r=q0B−Cq0B+C,t=2q0q0B+CR=∣r∣2,T=qsq0∣t∣2,Ru=Rs+Rp2\begin{aligned}M&=\prod_jM_j,\quad B=M_{11}+q_sM_{12},\quad C=M_{21}+q_sM_{22}\\r&=\frac{q_0B-C}{q_0B+C},\quad t=\frac{2q_0}{q_0B+C}\\R&=|r|^2,\quad T=\frac{q_s}{q_0}|t|^2,\quad R_u=\frac{R_s+R_p}{2}\end{aligned}

Transmittance includes the normal energy-flux factor. It is calculated from the transmitted amplitude, not assigned as one minus reflectance. Unpolarized light averages powers, not complex amplitudes. The subscript on the substrate admittance is not s polarization.

A design point, not universal invisibility

n1=n0ns,d1=λ04n1,R(λ0,0)=0n_1=\sqrt{n_0n_s},\qquad d_1=\frac{\lambda_0}{4n_1},\qquad R(\lambda_0,0)=0

The preset requests these ideal values; finite slider resolution introduces residual reflection below the displayed precision. The exact mathematical design is checked separately. Detuning wavelength, angle, index or thickness reveals reflection.

Spectrum to colour at fixed exposure

(X,Y,Z)=∫360830SD65(λ)R(λ)(xˉ,yˉ,zˉ) dλ∫360830SD65(λ)yˉ(λ) dλ(X,Y,Z)=\frac{\int_{360}^{830}S_{D65}(\lambda)R(\lambda)(\bar x,\bar y,\bar z)\,d\lambda}{\int_{360}^{830}S_{D65}(\lambda)\bar y(\lambda)\,d\lambda}

Official CIE 1931 two-degree functions and D65 data are sampled at 1 nm with trapezoidal integration. The same calculation with transmittance produces the transmitted patch. XYZ is converted to linear sRGB, clipped to the display gamut and encoded. No spectrum is renormalized to its brightest point. The specimen is an unlit colour patch, not a physically rendered reflective environment.

Common difficulties

A rainbow surface is not a thin-film calculation

Typical misconceptionAny iridescent material shader correctly simulates soap bubbles and all optical coatings.

Better mental modelColours must follow a solved spectrum, illuminant and observer. Here the substrate is semi-infinite, layers are planar and lossless, and only a single layer or repeated identical bilayers are editable. Bubble curvature, fluid thickness fields, absorption, material dispersion and arbitrary per-layer designs need additional models.

Run the experiment

  1. 01

    Scene 1: Flat soap film in air

    Set the soap-film thickness to zero, then raise it. The actual section thickens; colours arise from the spectrum, not a time animation.

    What to observe: A vanishing soap film reflects nothing but still transmits unit power.
  2. 02

    Scene 2: Single-layer antireflection

    Select antireflection and probe 550 nm. Change wavelength or angle without retuning the layer to break the cancellation.

    What to observe: Ideal antireflection at the design wavelength need not make the daylight reflection exactly black.
  3. 03

    Scene 3: Five-pair dielectric mirror

    Select the multilayer scene. Edit both thicknesses, both indices, repeat count and substrate. Then compare s and p at oblique incidence.

    What to observe: A dielectric mirror has a band, not uniformly perfect reflection. Its angle map exposes spectral and polarization dependence.
FeedbackSomething broken, confusing, or missing on this page?Tell us
What kind of feedback?

Sent with this page’s address, its Lab ID, the site language and your device type. Please leave out personal details. Feedback is kept for up to 12 months.Privacy policy