<p>I just went through this by myself.  The principal thing you have to do is choose the vector format for your ephemeris, and then download the ephemeris as a plain text (ascii) table. This is way easier than using the Spice tools.</p>

CC BY-SA 3.0
2017-07-19T21:29:26.130Z
I was actually able to using the Python SpicyPy library to get the coordinates quite easily! It's a fantastic tool.
Chris Wilson
CC BY-SA 3.0
2017-10-16T17:44:36.903Z
@ChrisWilson if you are so inclined, you could leave an answer here and even accept it. Also, [this answer has lots of python goodies](https://space.stackexchange.com/a/23409/12102) for calculating orbits and reading Horizons data.
uhoh
CC BY-SA 3.0
2017-07-18T15:58:38.387Z
2017-07-18T15:58:38.387Z
Peter
<p>I'm trying to build a 3D model of the Sun, Earth and Moon in in Javascript (using Three.JS, which relies on x,y,z coordinates for all objects) in order to simulate the Aug. 21 eclipse. I've successfully figured this out using the Kepler method that <a href="https://ssd.jpl.nasa.gov/txt/aprx_pos_planets.pdf" rel="nofollow noreferrer">NASA describes</a>, but would like to use the HORIZON ephemeris data for greater accuracy, given how sensitive the timing of an eclipse can be.</p>

<p>I've read up on celestial coordinates, but still can't quite figure out how to take the output of the HORIZON tool and convert RA, Dec, etc into 3D coordinates, the way the Kepler document outlines. Can anyone point me to an authoritative primer one how to get from celestial coordinates to geometric coordinates?</p>

<p>Coordinates based on AU are just fine -- I've already figured out how to scale that in the simulator.</p>

<p>Thank you!</p>

<planet><positional-astronomy><ephemeris>
How to visually chart HORIZON ephemeris
Chris Wilson
# How to visually chart HORIZON ephemeris

(Asked by: username_0 on 2017-07-15)

I'm trying to build a 3D model of the Sun, Earth and Moon in in Javascript (using Three.JS, which relies on x,y,z coordinates for all objects) in order to simulate the Aug. 21 eclipse. I've successfully figured this out using the Kepler method that [NASA describes](https://ssd.jpl.nasa.gov/txt/aprx_pos_planets.pdf), but would like to use the HORIZON ephemeris data for greater accuracy, given how sensitive the timing of an eclipse can be.

I've read up on celestial coordinates, but still can't quite figure out how to take the output of the HORIZON tool and convert RA, Dec, etc into 3D coordinates, the way the Kepler document outlines. Can anyone point me to an authoritative primer one how to get from celestial coordinates to geometric coordinates?

Coordinates based on AU are just fine -- I've already figured out how to scale that in the simulator.

Thank you!

**Tags:** planet, positional-astronomy, ephemeris


---

## 1 answers

### Answer by username_1 on 2017-07-18. Score: 1

I just went through this by myself. The principal thing you have to do is choose the vector format for your ephemeris, and then download the ephemeris as a plain text (ascii) table. This is way easier than using the Spice tools.

> **Comments:**
> **username_0**: I was actually able to using the Python SpicyPy library to get the coordinates quite easily! It's a fantastic tool.  
> **username_2**: @ChrisWilson if you are so inclined, you could leave an answer here and even accept it. Also, [this answer has lots of python goodies](https://space.stackexchange.com/a/23409/12102) for calculating orbits and reading Horizons data.  

---

