I am trying to create my own Star Finder based on the templates from the 2120-D model.
I started with a semi-sphere expressed as circles of latitude and semi circles of longitude, rotated along the X axis and projected in 2D, which obviously wasn't it.
I then read that a stereographic projection is used, so I tried rotating and projecting my semi-sphere following the formula:
$X = \frac{Rx}{R - z}; Y = \frac{Ry}{R - z} $
where $x,y,z$ are the 3D coordinates of the semi-sphere and $X, Y$ are their projection on the 2D plane, $R$ being the radius. That was close, but as the rotation tends to 90°, the projection extends to infinity.
I finally tried the opposite, drawing concentric circles and lines in 2D projected into the Riemann sphere using the inverse projection formula,
$x = \frac{2R^2 X}{X^2 + Y^2 + R^2}; y = \frac{2R^2 Y}{X^2 + Y^2 + R^2}; z = R\frac{X^2 + Y^2 -R^2}{X^2 + Y^2 + R^2}$
but that was also a failure.
How are these templates generated? I've notice that, regardless of the rotation in latitude, the points at lon 90° and 270°, and lat 0° don't move, and every point in the meridian 0°/180° moves downward in a linear fashion. What type of projection is this?
Edit: I've found something called the Azimuthal Equidistant Projection, but it only has parametric transformations. Is there a Cartesian representation for this projection?
After a lot of research, both on books and articles, I found that the projection used is not a stereographic one, but an azimuthal equidistant one. The articles in Wikipedia and Wolfram were a bit confusing, but luckily this link made everything clear.
https://stackoverflow.com/questions/11945814/formulas-in-azimuthal-equidistant-projection
Basically, there is no cartesian representation of an Azimuthal Equidistant projection. It's all expressed in parametric form. Luckily, that's how I drew my sphere. And instead of rotating the sphere, I just moved the center of the projection $(\phi_1, \lambda_0)$.
First, you need to calculate $c$, the angular distance using the formula
With that, you get $k = c /\sin(c)$, and with that, you can calculate $(X,Y)$, the cartesian coordinates in the 2D plane.
Since I changed the center of the projection along the same meridian, choosing $\lambda_0 = 0$ simplified a lot of calculations.
Also, the resulting projection had to be normalized, so I did $(X',Y') = R/\pi (X,Y)$ to get my desired plot of radius $R$.