I'm trying to calculate the x, y and z coordinates of a simple circular orbit in 3d space.
Calculating an orbit on the XY plane has the following simple algorithm.
alpha = 0.0
deltaAlpha = 0.1
radius = 1000.0
while(true)
{
posX = cos(alpha) * radius
posY = sin(alpha) * radius
posZ = 0.0
// do something with pos values
alpha += deltaAlpha;
}
I'm now trying to introduce an inclination (angle from the XY plane) to the algorithm but am struggling to find a solution. Can anyone help?