This is the 2D-native counterpart to the 3D cataract simulator. Instead of orbiting instanced spheres inside a rendered lens ellipsoid, it draws three genuine 2D diagrams that all read the same underlying physics live:
- Coagulation view — a real 2D Brownian-dynamics population of crystallin aggregates, diffusing and reflecting inside a lens cross-section disc. Their count and radius are set from the exact same volume-conserving coarsening law as the 3D model; drag to pan, scroll to zoom.
- Photon Monte Carlo transport — every photon independently samples its own free path from the exact exponential (Beer–Lambert) distribution, ℓ = −ln(u)/μ with u~Uniform(0,1), then either scatters out before crossing the lens or survives to the far edge. The running fraction that survives is an independent statistical estimate of transmission — watch it converge to the closed-form curve as more photons fly.
- Transmission spectrum — T(λ) plotted directly from the closed-form model across the visible range, with the current wavelength marked.
Rayleigh cross-section (dipole, radius a ≪ λ), capped near geometric limit:
σ(a,λ) = [ 1/σ_Rayleigh + 1/σ_geom ]⁻¹
σ_Rayleigh = (8π/3)·(2π/λ)⁴·a⁶·((m²−1)/(m²+2))², σ_geom = πa²
Volume-conserving coarsening: N(a) = N₀·(a₀/a)³
Attenuation coefficient: μ = N(a)·σ(a,λ)·κ (per nm)
Beer–Lambert: τ = μ·L, T = exp(−τ)
Photon free path (exact MC sampling of the same law):
ℓ_scatter = −ln(u)/μ, survives if ℓ_scatter > L
Aggregation slider — advances mean aggregate radius a from ~5 nm toward ~140 nm.
Wavelength slider — σ ∝ λ⁻⁴ in the Rayleigh regime, so blue scatters far more than red.
Lens path length — the physical thickness the light crosses; longer paths accumulate more optical depth for the same haze.
Photons in flight — how many independent Monte Carlo photon packets are sampled at once; more photons make the running MC estimate converge tighter to the theory curve.
Refractive indices, protein volume fraction and the calibration constant κ are identical to the 3D model, so every slider still traces the same physical lens — only the representation is genuinely 2D.