# Create star map with polar projection from Right Ascension and Declination

I'm hoping this is the right place to find help with this. Here's a brief description of what I have so far and the context for what I need.

I'm creating a star map within Unity 2D, consisting of one rectangular map, with an equirectangular projection, showing the stars from declination -45 to +60. To make this I've used the HYG star database found here, filtered out the stars I don't need then converted the RA value to longitude (-RA * 15), and used the Dec value as latitude. This is then pulled into unity, scaling the long/lat by (a/360) * 24 where l is long/lat to give X co-ordinates between 0 & 24.

The trouble is replicating this for the polar map. I need the stars above declination 45.

I've tried using QGIS to project the stars as polar, but this is not working, I'm not sure why. I've found a different dataset that I can get projected properly for both maps, but exporting the co-ordinate data to a CSV gives me massive numbers and I'm not sure how to go about scaling it correctly.

Ideally, I'm looking for a way of converting RA and Dec to coordinates for a polar projection with a given radius (12), OR a way of scaling the co-ordinates from QGIS.

EDIT: I've found this page with a formula, which looks like what I might need, I just don't understand it.

EDIT: Images for reference.

Polar Map centred on north pole

Rectangular map

EDIT: My (I think correct) makeshift solution.

Each star is pulled into unity, at `(0,D)` units away from the centre point of the map. Where `D = declination/360 * 24` (to scale it correctly). The star is then rotated around the centre point by `R`degrees, where R is `-right ascension * 15` (right ascension goes between 0 and 24, so * 15 to scale to 0-360. Negative to flip the image to be correct).

• I imagine how does a star map looks, can you add some screenshots for reference and corrections expected? Commented Jan 13, 2021 at 9:27
• I've added images for reference. Commented Jan 13, 2021 at 9:57

Azimuthal equidistant direct projection, tangent to the North Pole, will let you see negative declination stars. The image is not too realistic, but it preserves distances in the direction of meridians and it is used because that property.

I don't agree with how QGIS manage non-Earth datums, so seems better to me if you compute the coordinates of the projection. But scaling the map if you have it for a 6378100 radius, to a 12 radius, is not so hard.

The projection is defined for a unity sphere, because a number may represent an angle (in radians) and the arc of that angle in the sphere. You just need to multiply for your radius (`R`) to get the true arc in non-unity spheres.

So: `k' = c / sin(c)` turns on `k' = R c / sin(c)`. And `c`, the distance to the center, when the center is the pole, represents the colatitude `C`, where `C = (π/2) - φ`, being `φ` the latitude, that is the declination (`δ` in my notes) in absolute celestial coordinates for a star.

`k' = R ((π/2) - δ) / sin((π/2) - δ)` or `k' = R ((π/2) - δ) / cos ( δ )`

Then, `λ_0 = 0` (longitude of the center), and `φ_1 = π/2` (latitude of the center).
`λ = α`, the right ascension, and `φ = δ`, the declination.
Right ascensions go from `0` (in the spring equinox direction) to `2 π`, declinations go from `-π/2` to `π/2`.

Simplified formulas (since `cos(π/2) = 0` and `sin(π/2) = 1`) are:

`x = k' cos(δ) sin(α)`
`y = k' -cos(δ) cos(α)`

`k'` isn't determined for both poles. The center of the projection is `x = 0`, `y = 0` by definition and its antipode is not included in the domain of the transformation.

• Thank you, this is very helpful. I've actually managed to find a kind of 'bodged' way of achieving the result, I haven't properly checked if it's right yet, but if not I'll give this a go. I'll edit in my method to the question. Commented Jan 14, 2021 at 9:17

I couldn't really figure out these answers, but I found a pretty straightforward way to create a star map.

I downloaded the Yale Bright Star Catalogue, and converted it to a csv file that I could use in Excel and in QGIS.

The key fields are the Right Ascension, which gives the x value, and the Declination, which gives the y value.

Right Ascension is given in hours, for 24 hours in a full circle. This needs to be converted to degrees (360° in a circle), the range changed to -180° to +180°, and it also needs to be reversed (multiply by -1), or the star map will be backwards. This is easy enough to do in Excel: (Right Ascension in degrees) = (Right Ascension in hours) / 24 * 360 * (-1) - 180

The declination is given in degrees, so that can be used as is.

Then import it into QGIS, using the converted Right Ascension as the x-value and the Declination as the y-value.

Import it as WGS 84 (EPSG 4326), and then reproject it as North Pole Azimuthal Equidistance (EPSG 102016). There is also a South Pole option, if you want to project for the southern hemisphere.

If you want it to only show the starts that are visible from your location, you can exclude the stars that have a declination below (or above) the relevant value.