You are browsing as a guest. Sign up (or log in) to start making projects!

6h 24m 56s logged

Firstly - yes, I have 6 hours on this, because I switched ideas midway (so essentially 2 hours of work gone lol)

FinderScope

i was mid-attempt at memorising all 88 constellations using some app, got through easy mode fine, then hit a paywall the second i wanted the other two difficulties. so, obviously, I’m building my own cause nobody should have to pay for something as simple as this.

the idea is a constellation naming quiz. it zooms into a random constellation somewhere in the sky, you guess what it’s called, and there’s three difficulties depending on how many of the surrounding constellation lines you get to see (all of them, just the neighbours, or none). eventually there’ll be a learn mode too that splits northern/southern sky and gives you the actual mythology name alongside the IAU one.

started with v1 today: just getting one constellation to render and project correctly, no game logic yet.

the data problem

turns out there’s no NASA-style API for “here’s every constellation’s star positions and line segments,” so i pulled from d3-celestial, an open source star chart project on github. grabbed:

  • constellations.lines.json — RA/dec coordinates for every line segment in all 88 constellations
  • constellations.json — names, including an en field with the actual mythology name (canis major → “great dog”, that kind of thing)

wrote a python script to slim both down into one dataset per constellation: id, name, en, a precomputed centre point, and the line coordinates. centre point was its own small problem — you can’t just average RA values because of the 0°/360° wraparound, so i averaged everything as unit vectors on the sphere instead and converted back. way cleaner.

projection

the actual hard part. “zoom into a random constellation” means taking a patch of sky centred wherever that constellation sits and flattening it onto a canvas. went with a stereographic projection, standard formula, centred on each constellation’s precomputed centre.

tested the maths in node before touching canvas at all — ran orion through it and checked the projected bounds didn’t blow up or do anything weird near the pole. glad i did that first, would’ve been a nightmare to debug visually.

canvas side just auto-fits whatever bounding box comes out of the projection, so it works whether the constellation is tiny (like crux) or sprawling.

what’s off right now

some of the constellation names/lines from the dataset are a little wrong — going to go through and fix those manually rather than trying to patch it in code.

what’s next

  • neighbouring constellations (so medium/easy difficulty actually has something to show)
  • difficulty tiers
  • actual guess-checking
  • learn mode with the hemisphere split
0
3

Comments 0

No comments yet. Be the first!