Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Given the Right ascension in h m s, Declination in deg ' " and the Trigonometric parallax How can I get the cartesian (x,y,z) coordinates of a star? I'm guessing I need 3 separate formulas to get each x, y and z values.

share|cite|improve this question
Why do you need Cartesian coordinates? In any event... – J. M. Dec 23 '10 at 10:09
Then your declination corresponds to $\theta$, right ascension to $\phi$ and parallax to $r$ for a properly referenced spherical coordinate system. See – Ross Millikan Dec 23 '10 at 14:15
@J.M. to plot thing in openGL you need Cartesian coordinates. @Ross - Thanks I'll look into it. – Justin808 Dec 24 '10 at 20:16
up vote 0 down vote accepted

I know this is old, but here is the answer:

A = (RA_hours * 15) + (RA_minutes * 0.25) + (RA_seconds * 0.004166)

B = ( ABS(Dec_degrees) + (Dec_minutes / 60) + (Dec_seconds / 3600)) * SIGN(Dec_Degrees)

C = distance in light years or parsecs


X = (C * cos(B)) * cos(A)

Y = (C * cos(B)) * sin(A)

Z = C * sin(B)

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.