I have been trying to create a calculator which finds the distance between two stars that the user chooses. But I'm having a hard time visualizing where these stars are in real space. Do you know of any software that could actually help me crate a star map with only the stars in my calculator? I know of some star maps like Celestia, but I would like to be able to create my own map that only contains certain stars. If there isn't anything, I can find my own solution. Thanks in advance for any answers!


2 Answers 2


I hope the following doesn't come across as self-promotion, but you can have a look at the source code for my near-space 3D map:


Just View Page Source.

It's not perfect - the 3D projection is not geometrically accurate, and some brighter stars are duplicated. But it might give you a starting point?


If you don't mind doing a bit of math and/or some light programming, it's not all that hard.

The position of stars is defined by declination and right ascension and, of course distance.

Declination is basically just North/South. Polaris, for example has a declination of +90 degrees (well, pretty close).

Stars directly over the equator, declination is 0. Above the south pole, -90.

Right ascension is measured in hours, minutes and seconds, where each hour is 15 degrees of arc. (24 hours, 360 degrees - that makes sense, right?)

If you want to create a cartesian map, set Earth (or the Sun, 1 AU won't change things much) at 0,0,0. I personally find using East-West and Up-Down a little confusing (on Earth we use, East-West, North-South and Up-Down for 3 dimensions), but in space, I use North-South (X coordinate), and unnamed Y coordinate and Z coordinate when converting to cartesian, but you can use whatever terms you like as long as yours are consistent.

1 light year at 90 declination would be 1,0,0. 1 light year at -90 declination would be -1,0,0. With 3 cartesian coordinates you can work out the distance between two stars easily, just use a little 3D Pythagorean Theorem. Subtract the variation in each coordinate square them, add the and take the square root.

Using Alpha Centauri as an example:

Right ascension 14h 39m 36.49400s

Declination –60° 50′ 02.3737″

Distance 4.37 ly

For the North-South direction, take the sine of the declination and multiply by the distance. Sine of -60 degrees, 50 minutes and change is about -0.873, giving Alpha Centauri (A or B, take your pick) a -3.816 North/South coordinate and a remaining 2.13 light years for the other two coordinates.

Now convert the 14 hours 39.6 minutes into degrees, 15 degrees per hour, and you get 219.9 degrees. Take the sine and cosine of that number and multiply by the remaining 2.13 light years for those two coordinates and you get -1.366 and -1.634, so Alpha Centauri (they're close enough that it doesn't matter which) has the cartesian coordinates, in light years of -3.816, -1.366 and -1.634 relative to the sun.

Set up a little program and you can plug in declination, right ascension and distance for any star and you can convert their position to cartesian coordinates. There may be easier ways to do it or programs already set up or 3D graph software, that allows you to plug in the polar coordinates directly, so there may be easier methods, but that's the method I know to create a local star map, if desired.

You can also look up local star maps easily enough to check your work, but it's difficult to display 3 dimensions on a 2D screen, so it can be hard to eyeball distances from a local star map.

Wikipedia local star map

Similar map

Keep in mind, for more distant stars, distance becomes harder to measure, so the further away you go, the less accurate your map will be. Betelgeuse, for example, has a pretty big range of uncertainty on it's distance. Big enough that measuring the distance between stars that far becomes an exercise in futility.

  • $\begingroup$ I dont think you understand, I already know the coordinates, I just want to know of a 3d graphing software I can use to visualize the coordinates. $\endgroup$ Jul 30, 2019 at 18:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .