All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Building Hengefinder: A Programmer's Guide to Calculating Urban Solar Alignments

By

evakhoury

9d ago· 14 min readen

Summary

A programmer at the Recurse Center describes building "Hengefinder," a tool to calculate when the sun aligns perfectly with city streets (like Manhattanhenge). The article explains the astronomical calculations behind solar alignments, including the sun's declination, the equation of time, and how to compute sunset azimuth angles. The author then generalizes the concept beyond Manhattan, creating a tool that works for any city grid orientation, and shares the technical implementation details including code snippets and mathematical formulas.

Key quotes

· 3 pulled
Next week in Manhattan, the sunset will align perfectly with the east-west streets of the city grid. It's beautiful, and people know it.
I wanted to know how astronomers figure out when Manhattanhenge happens. And if I could figure that out, why limit it to Manhattan?
This was one of my first projects at the Recurse Center: Hengefinder.
Snippet from the RSS feed
Next week in Manhattan, the sunset will align perfectly with the east-west streets of the city grid. It’s beautiful, and people know it. Twice a year, crowds gather to see the brief moment when the sun sits perfectly on the horizon, framed by skyscrapers

You might also wanna read