On coding, tech, privacy, AI and whatever else comes to this mind.

I've been playing around with map projections lately. Fascinating and mind-bending stuff, though the maths, trigonometry, and edge cases can be a challenge, and trying to fix the various glitches makes me my head hurt...

It's a rewarding exploration and I'm learning a ton. And may I say, on the Mac is great for writing a helper app to test and debug this.

Library for it is up on GitHub already: https://github.com/maparoni/GeoProjector. If I manage to fix the bugs, I'll add this to @maparoni.

It has some bad polygon drawing glitches that make me doubt myself. Then I check a similar GitHub repo to see how they approached that particular problem, see that it has a TODO marker for it, and feel a bit better… still want those glitches squashed though!

Just realised that I can work around the worst glitches by using smaller polygons. In particular, rather than drawing entire land masses, I can draw countries, which then avoids most of the problems. Hooray. Can, meet road. *kick*

Screenshot of experimental macOS app for map projections, showing a glitch from the orthographic projection due to a big dividing line crossing from the Pacific to the Indian Ocean.
Screenshot of experimental macOS app for map projections, showing the outline of countries as expected, glitch-free, from the orthographic projection.