Sun and Moon /v1

Golden hour

·

Drag the ribbon, or focus it and use the arrow keys. Every colour on it is the sky at that minute, computed for this coordinate. The land below the horizon is drawn, not measured — every time on this page assumes a flat horizon at sea level. Drag the ribbon. The land is drawn, not measured — times assume a flat horizon.

This is the request behind what you just dragged.

Nothing on this page is mocked. The panel is the live response for the exact instant under the playhead — same fields, same rounding, same time zone resolution.


  

One place. One year. One image.

Every pixel is a real solar altitude — 52 560 of them, computed in your browser as you watch. The wall is what 365 calls to /v1/sun look like at once.

Where naive implementations go wrong.

Each of these is a real answer from the same code, with one assumption changed. The difference is the product.

The disc has a radius. The air bends light.

Sunrise is the moment the upper limb clears the horizon, lifted by 34′ of refraction and 16′ of disc radius. Code that waits for the centre to cross zero is late every single morning.

Standing higher moves the horizon down.

Height above the surrounding terrain dips the horizon by about 1.76′ per √metre. At 3 000 m that is 1.6° — the Sun arrives while the valley is still dark.

Sometimes the Sun does not rise at all.

Above the polar circles there is no sunrise to return. An API that answers null without saying why turns into a crash in someone else's client.

The Moon, pointed the right way.

Phase is not a picture from a list of eight. It is an illuminated fraction and a bright limb that points at the Sun — which is why the crescent tilts differently in Oslo and in Nairobi.

Seven endpoints. One coordinate. Any date between 1700 and 2200.

Computed from VSOP87 and NOVAS models, accurate to within one arcminute. No upstream feed, nothing to go stale.