Homebrew Map Projections
George Shoemaker, Novemeber 2024
Taking 3D latitude & longitude coordinates and plotting them on a 2D screen.
Equirectangular Projection
As simple as it gets! Use longitude for X and latitude for Y and you get a decent projection.
Equirectangular seriously stretches features horizontally as you approach the poles.
Mercator Projection
A bit more sophisticated. Keep using longitude for X.
Y = map width * ln [ tan( π / 4 + latitude / 2 ) ]
Mercator is know for stretching features vertically as you approach the poles. In fact, the poles themselves result in infinitely large Y values.
Resources used
- Map projection: An intro for multivariable calculus by Professor Mark McClure
- Mercator pseudo code by Michel Feldheim on Stack Overflow
- p5.js to plot polygons on the screen
- Google Earth desktop to trace lat / long polygons
- Hosted via GitHub Pages. View my source repository homebrew-map-projections