Chapter 3 covers simple harmonic motion: a value driven by a sine wave. Tides are the ocean’s version of that, a sum of sine waves at known astronomical periods, so this expansion tries to fit oscillators to real water levels.
The page pulls three days of six-minute water-level readings from NOAA’s San Francisco gauge and plots them in blue. Over the top it draws an orange model made of just two constituents: the M2 lunar semidiurnal tide at 12.42 hours and the S2 solar one at 12.00 hours. The model’s phase nudges itself toward the data each frame. Two sines already track most of the real curve, which is the chapter’s whole point about how far simple harmonic motion can go.
Data source: NOAA CO-OPS (Tides & Currents) API
Endpoint:https://api.tidesandcurrents.noaa.gov/api/prod/datagetter?station=9414290&product=water_level&...
Access: Public, no key. Loaded from an hourly server-side refresh when possible, with a bundled snapshot fallback, and a live browser fetch only when the API allows CORS. Data window: Jul 15, 2026 - Jul 18, 2026 (pulled Jul 18, 2026 UTC)
Real tide prediction uses dozens of constituents, but the big two carry most of the signal on a normal day.