This page contains a detailed description of the derivation of the formulas for the equatorial rectangular coordinates of a star from the RA and the DEC. If you know the basic trigonometry of a right angled triangle, you should have no special problems with this section.
The system of rectangular coordinates used has;
We assume that the stars are all at the same distance from the centre of the celestial sphere, and we may as well call that distance 1 unit. Suppose we call the origin of our set O, and suppose a star is at S, so the line OS has length 1 unit. You can work out the x, y, and z coordinates of the star using nothing more than the trigonometry of two right angled triangles. The situation is shown in fig 1 if you are using a graphical browser to view these pages;
The Z coordinate of the star's position is equal to the length of a line dropped down from the star to the XY plane. Call the point in the XY plane directly underneath the star S'. The Z coordinate of the star is now the length SS' (see fig 1).
We now have a right angled triangle with hypotenuse OS (see fig 2 below for a clearer view of the triangle).
To get the values of the Y and X coordinates, we need to look at another triangle, in the XY plane (see fig 3). You need to imagine that the Z axis is pointing out of the screen.
cos(dec). Applying trigonometry to the situation gives us;
Ox = OS' * cos(ra) = cos(ra)*cos(dec), and this is the X coordinate of the star
Oy = OS' * sin(ra) = sin(ra)*cos(dec), and this is the Y coordinate of the star
Summarising these results we get;
X = cos(ra) * cos(dec) Y = sin(ra) * cos(dec) Z = sin(dec)
You may not be at all surprised to learn that the same reasoning applies to geocentric ecliptic coordinates. This time the axes are;
We get the following formulas (where L is ecliptic longitude and B is ecliptic latitude)
X = cos(L) * cos(B) Y = sin(L) * cos(B) Z = sin(B)
Last Modified 6th September 1998