This topic is now archived and is closed to further replies.


Ellipse Rotation

Recommended Posts

Hi guys, I've got a quick question for you. Does anyone know how to rotate an object around an axis in an elliptical path (like planets around the sun). I know how to do it in a circular path by using D3DXMatrixRotationY. Does anyone know what the transformation matrix is that will do the job. Or a function in DirectX (8) similar to D3DXMatrixRotationY to produce this matrix. Thanks in advance Andy ----------------------------- Andy Pike Edited by - bigandy on March 18, 2002 11:13:29 AM

Share this post

Link to post
Share on other sites
In my space engine, I use two methods for object orbits :

* Use NASA JPL ephemeride data, look it up from a table, and interpolate the position. Each sample at one hour intervals. I use the DE-406 ephemeride set. You could also use VSOP87 if you wanted to. This way, there are no calculations, and the data is far more accurate than any algorithm you could run in real time on a homebrew PC.

* Use kepler equations to calculate the object orbital position.

A good tutorial would be :

Computing Planetary Positions by Paul Schlyter.

Alternatively check out the source code for Celestia. The code is specific to OpenGL, but the algorithms are useful and the code is easily converted to DirectX.

Hope this helps,


Share this post

Link to post
Share on other sites