← Back to context

Comment by nativeit

3 days ago

I was just thinking about how to slice up a star map projection, and apply it as an overlay. I don’t do such things often enough to do it quickly, although I can imagine how it could be achieved. I’d imagine someone working in game dev probably could whip up a mechanism for applying coordinates to a star map fairly quickly, but realizing it in pure CSS would probably require exporting all the slices to a folder as SVG squares that are labeled with coordinates, and then using a bit of JS to stitch it all together in the rendered page.

I wrote a simple web-based night sky viewer a while ago [1], which renders the 750 brightest stars from coordinates in a data file (along with the moon). It uses D3.js to do fully client-side SVG-based rendering for interactive use, but it could be simplified to render server side to an SVG file. I think the main complication is that by adding stars, a projection needs to be decided on, and you'd need to consider the aspect ratio of the browser window.

[1] https://github.com/mpetroff/nightsky