Re: converting star coordinates to x,y,z

From: Brian Tung (brian_at_isi.edu)
Date: 12/09/04


Date: Thu, 9 Dec 2004 17:25:56 +0000 (UTC)

Rick wrote:
> I'm working on a project of modeling the stars of the constellations in
> 3-D; not for their positions relative to Earth, but relative to any
> given person being at 0,0,0.

You need RA, Dec, and parallax for each star. You can then convert to
rectangular coordinates as follows:

    1. First, convert RA and Dec to decimal degrees.

            RA_deg = 15*RA_h + RA_m/4 + RA_s/240
            Dec_deg = Dec_d + Dec_m/60 + Dec_s/3600

    2. Next, convert parallax to distance (in parsecs).

            Dist = 1/Par_arcsec, *or*
            Dist = 1000/Par_mas

        Here, mas = milliarcseconds, a common unit for parallax.

    3. Then convert to rectangular coordinates. There is no fixed way
        to do this; however, one way is

            x = Dist * cos(Dec_deg) * cos(RA_deg)
            y = Dist * cos(Dec_deg) * sin(RA_deg)
            z = Dist * sin(Dec_deg)

        Many programming languages perform trigonometric operations in
        radians rather than degrees. In that case, first convert the
        coordinates to radians:

            RA_rad = RA_deg * (PI/180)
            Dec_rad = Dec_deg * (PI/180)

        where PI = 3.14159..., and then

            x = Dist * cos(Dec_rad) * cos(RA_rad)
            y = Dist * cos(Dec_rad) * sin(RA_rad)
            z = Dist * sin(Dec_rad)

I guess I should have made you look it up, but I'm feeling generous
today.

Brian Tung <brian@isi.edu>
The Astronomy Corner at http://astro.isi.edu/
  Unofficial C5+ Home Page at http://astro.isi.edu/c5plus/
  The PleiadAtlas Home Page at http://astro.isi.edu/pleiadatlas/
  My Own Personal FAQ (SAA) at http://astro.isi.edu/reference/faq.txt



Relevant Pages

  • Re: converting star coordinates to x,y,z
    ... >> I'm working on a project of modeling the stars of the ... pre-calculus class should be able to solve in 5 minutes. ...
    (sci.astro.amateur)
  • converting star coordinates to x,y,z
    ... I'm working on a project of modeling the stars of the constellations in ... not for their positions relative to Earth, ...
    (sci.astro.amateur)
  • converting star coordinates to x,y,z
    ... I'm working on a project of modeling the stars of the constellations in ... not for their positions relative to Earth, ...
    (sci.astro)
  • Re: converting star coordinates to x,y,z
    ... >I'm working on a project of modeling the stars of the constellations in ... (And considerate neighbors!!!) ...
    (sci.astro.amateur)
  • The new Fall 2007 TV shows
    ... By Rick Kushman - Bee Tv Columnist ... Rick says: 1 1/2 stars ... Life Is Wild ... Parents of a shy teen know their kid is the school nerd. ...
    (rec.arts.tv)