This simulation shows how the length of the day, the duration of night-time melatonin secretion, and a modelled mood index all swing across the year because of Earth's 23.45° axial tilt. The photoperiod is computed astronomically from latitude and day-of-year using the solar declination and the sunrise hour-angle relation, day length = (2·arccos(−tan φ·tan δ))·12/π, which correctly yields polar day and polar night beyond the Arctic Circle.
The latitude slider (0–70°N) sets your position, the month slider picks the date, and the light-therapy slider (0–6 lux·h) adds morning bright light that shortens the effective dark period and suppresses melatonin onset. Switching between the Photoperiod, Melatonin and SAD views illustrates why people living at high latitudes experience long, dark winters that can trigger Seasonal Affective Disorder, and why light therapy is a frontline treatment.
What does this simulation actually show?
It plots three linked seasonal effects of daylight: the annual photoperiod (day length over the year), the 24-hour melatonin profile in winter versus summer, and a mood or serotonin index that drops in the dark months. You change latitude, month and light therapy to see how each curve responds.
How is day length calculated?
It uses the standard astronomical formula. The solar declination is approximated as 23.45° times the sine of a seasonal angle, and day length is (2·arccos(−tan φ·tan δ))·12/π hours, where φ is latitude and δ is declination. When the cosine term exceeds the valid range the model returns 24 hours (polar day) or 0 hours (polar night).
Why do days get shorter in winter at all?
Earth's spin axis is tilted about 23.45° relative to its orbit. In the hemisphere tilted away from the Sun, the Sun follows a lower, shorter arc across the sky, so there are fewer daylight hours. The effect grows stronger with latitude, which is why high-latitude winters are so dark.
Latitude (0–70°N) sets how far north you are, which determines how extreme the seasonal swing is. Current month chooses the date used for the markers and statistics. Light therapy (0–6 lux·h) adds simulated morning bright light that shortens the effective dark period and reduces melatonin in the model.
Melatonin is the hormone the pineal gland releases during darkness to signal night. The simulation builds a bell-like curve centred on roughly 2 a.m. whose width scales with the dark duration (24 hours minus day length). Longer nights produce a wider, longer melatonin window, and light therapy trims that window.
SAD is a recurrent depression tied to the dark months, linked to disrupted circadian timing and reduced serotonin activity. The SAD view derives a 0–100 mood index from day length, drawing a red threshold line; when the modelled mood falls below it, the shaded region marks the at-risk winter period that worsens with latitude.
In the simulation, light therapy shortens the effective dark duration and lifts the mood index, raising the winter curve back above the SAD threshold. In clinical practice, sitting near a 10,000-lux light box for around 30 minutes each morning advances circadian timing and suppresses daytime melatonin, which often relieves seasonal symptoms.
The photoperiod curve is genuinely accurate for the centre of the solar disc and matches published sunrise–sunset tables to within minutes. It does not add the small corrections for atmospheric refraction or the Sun's angular radius, and it assumes a circular orbit, so real twilight makes usable daylight slightly longer than shown.
These four points anchor the solar year. The equinoxes near 20 March and 22 September give roughly 12-hour days everywhere, while the solstices around 21 June and 21 December mark the longest and shortest days. The markers let you read off how steeply photoperiod changes between them at your chosen latitude.
It informs the treatment of seasonal depression with light therapy, the management of jet lag and shift work, the design of school and workplace lighting, and agricultural and livestock practices that depend on photoperiod. Chronobiologists also use these relationships to study how species time breeding, migration and dormancy to the changing seasons.