loading...
running...
The science
Tides. The sea level is a sum of harmonic constituents, η(t) = Σ Ai cos(2π t / Ti − φi) with the principal lunar M2 (T = 12.42 h), solar S2 (12.00 h) and diurnal K1/O1 terms. M2 and S2 drift in and out of phase with the beat period 1 / (1/TS2 − 1/TM2) = 14.77 days giving spring tides near new and full Moon (range up to 2(AM2+AS2)) and neap tides at the quarters. The model uses fixed phases and no shallow-water or local resonance effects.
Waves on a sloping beach. Linear waves obey the dispersion relation ω2 = g k tanh(k h) solved by Newton iteration. In deep water c = gT/2π; in shallow water c → √(gh). Because c falls as the water shoals, the wave direction bends according to Snell's law for waves, sin θ / c = sin θ0 / c0 = const and the height changes by H = H0 Ks Kr, Ks = √(cg0 / cg), Kr = √(cos θ0 / cos θ) from conservation of the energy flux E cg cos θ (Green's law, H ∝ h−1/4, in shallow water). Breaking starts when H = γ h, γ ≈ 0.78 (McCowan); inside the surf zone the height is held at γh. The breaker type follows the surf similarity parameter ξ0 = tan β / √(H0 / L0) (spilling below 0.5, plunging 0.5 to 3.3, surging above 3.3). Obliquely breaking waves drive a longshore current, here the Komar-Inman estimate V = 1.17 √(g Hb) sin θb cos θb The sea surface is the linear wave with a second harmonic that sharpens the crests.
Fresnel lens and the light. A Fresnel lens collapses a thick lens into concentric prisms (Augustin Fresnel, 1822), so a lens of focal length f and aperture A turns the lamp into a narrow beam. The peak intensity is the lamp luminance times the lens area, I = η L A (η = 0.8), and the horizontal divergence is about the lamp diameter over the focal length, Δθ ≈ s / f The lens turns at Ω = 2π / Trot, so a fixed observer sees a flash lasting about Δθ / Ω every Trot / Npanels. Illuminance at distance d follows Allard's law E = I · 0.05d/V / d2 (V = meteorological visibility, the 5 % contrast definition). The luminous range is where E falls to 0.2 µlx; the geographic range is the sum of the two horizon distances d = √((R+h)2 − R2) ≈ 3.57 √h km (a terrestrial refraction coefficient of 0.13 is used). The visible range is the smaller of the two.
Sky. The Sun's altitude comes from sin a = sin φ sin δ + cos φ cos δ cos H with declination δ = 23.44° sin(2π(N−80)/365.25). The Moon trails the Sun by its elongation and its phase is tied to the same clock as the tide.
Simplifications. Parallel depth contours (a straight beach), no wave-current interaction, no reflection, no wind setup or surge, a stylised bay and a procedural star field. Lamp luminance and the Allard threshold are typical round numbers, not a particular light. The beam in the scene is drawn wider than the true divergence so it reads on screen. In-page checks compare the dispersion solver with its deep- and shallow-water limits, a ray traced through the depth field with the ray equation against Snell's law, Green's law, energy-flux conservation, the spring-neap period of the computed tide, the solved Allard range, the horizon formula and the breaker depth found two ways.