Ellipse Rotation

Started by
0 comments, last by BigAndy 22 years, 1 month ago
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 www.andypike.com Edited by - bigandy on March 18, 2002 11:13:29 AM
-----------------------------Andy PikeDirectX 8 Tutorials: www.andypike.comBatch Image Processing Software
Advertisement
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,

Stoo.

This topic is closed to new replies.

Advertisement