Observatory ↗
← Writing

Engineering notebook

Opening AlgoLuna, with a view of the sky

A first entry in this engineering notebook, and a look at the catalog, geometry, and camera behind Observatory.

I’m opening AlgoLuna as a place for technical writing, software projects, and the questions that arise while building them. The interests behind it are fairly broad: intelligent software systems, the practice of engineering, and computational work that leaves room for curiosity. This first entry comes with a small project that grew out of the website itself.

Observatory is the moving sky behind these pages, opened up as an interactive visualization. You can follow the automatic camera, pause it, move around the sky, or find a particular star. Its appearance is deliberately spare, but the points have identities and fixed positions. Returning to the same view brings back the same pattern.

The project grew out of my interest in amateur astronomy. The visualization was coded using GPT 6 Astra.

From a catalog to a canvas

The data comes from David Nash’s HYG v4.1 catalog. A reproducible extraction keeps 25,791 stars through apparent visual magnitude 7.5, excluding the Sun. Each record retains its identifier, right ascension, declination, magnitude, and available B–V color index. Proper names are kept separately. The adapted catalog and attribution notes are available alongside the visualization under CC BY-SA 4.0.

Right ascension and declination locate a star on the celestial sphere. Converting them to a unit vector makes the star map independent of the screen. With the angles in radians, the conversion is:

x = Math.cos(dec) * Math.cos(ra);
y = Math.cos(dec) * Math.sin(ra);
z = Math.sin(dec);

The renderer constructs forward, right, and up vectors for the camera. Dot products express each star in that basis; dividing the horizontal and vertical components by its forward depth gives a perspective projection. Stars behind the camera or outside the viewport are discarded. JavaScript draws the remaining points onto a two-dimensional canvas.

That separation keeps resizing, panning, and zooming from generating a different sky. Zoom changes the projection’s focal length. Rotation changes the camera basis. Neither operation changes the catalog positions.

Moving through the view

The automatic tour interpolates between eight camera poses around Orion and its surroundings. Catmull–Rom interpolation gives the joins matching velocities, so direction changes, zoom, and roll form a continuous loop. The controls expose the same camera: manual movement pauses the tour, and resuming preserves the current view.

Annotations identify a star every fifteen seconds, with a faster cadence during the opening sequence. The automatic selector favors stars expected to remain visible through that interval. Choosing a star explicitly locks its annotation until it is released. The panel reports the view’s central coordinates, angular field of view, rotation, and visible-star count; the coordinates remain available when the controls are collapsed.

There are limits to what this shows. The positions are fixed at the catalog’s J2000 epoch. This is not the sky above a particular observer now: it does not calculate proper motion, atmospheric effects, planets, or satellite orbits. Point sizes, brightness, and color are display choices rather than calibrated photometry.

The same renderer serves as the site background. Content panes soften the stars and annotations beneath them, and the background can be hidden entirely. Reduced-motion preferences leave a still view. Observatory is a modest first artifact for this notebook: something to explore, with enough of its construction exposed to understand what is being seen.