- #1

AbsentMinded

- 3

- 0

apoapsis = (1+eccentricity)*SemiMajor;

periapsis = (1-eccentricity)*SemiMajor;

Semi-Minor = sqrt(apoapsis*periapsis);

SunFocus = sqrt((SemiMajor)^2-(SemiMinor)^2);

xc = SunFocus*cos(ArgOfPeriapsis);

yc = SunFocus*sin(ArgOfPeriapsis);

x = xc + SemiMajor*cos(time)*cos(ArgOfPeriapsis) - SemiMinor*sin(time)*sin(ArgOfPeriapsis);

y = yc + SemiMajor*cos(time)*sin(ArgOfPeriapsis) + SemiMinor*sin(time)*cos(ArgOfPeriapsis);

z = ?

This is psuedocode of a Matlab function. The inputs are the 5 orbital elements listed above (no mean anomaly for now). The orbits plot perfectly in two dimensions for every object I've thrown at it (plantes, dwarfs, comets, etc.), but I really want to get the inclination in there for 3 dimensions. Any help would be greatly appreciated.