Parametric Equation of a Circle in 3D Space? So, my dilemma here is... I have an axis. This axis is given to me in the format of the slope of the axis in the x,y and z axes.

I need to come up with a parametric equation of a circle. This circle needs to have an axis of rotation at the given axis with a variable radius.

I've worked on this problem for days, and still haven't come up with a solution.

I'm using this circle to map the path of a satellite, programmed in C.

And help would be greatly appreciated.

Thanks!
Let $(a_1,a_2,a_3)$ and $(b_1,b_2,b_3)$ be two unit vectors perpendicular to the direction of the axis and each other, and let $(c_1,c_2,c_3)$ be any point on the axis. (If ${\bf v} = (v_1,v_2,v_3)$ is a unit vector in the direction of the axis, you can choose ${\bf a} = (a_1,a_2,a_3)$ by solving ${\bf a} \cdot {\bf v} = 0$, scaling ${\bf a}$ to make $\|{\bf a}\| = 1$, then letting ${\bf b} = {\bf a} \times {\bf v}$.)

Then for any $r$ and $\theta$, the point $(c_1,c_2,c_3) + r\cos(\theta)(a_1,a_2,a_3) + r\sin(\theta)(b_1,b_2,b_3)$ will be at distance $r$ from $(c_1,c_2,c_3)$, and as $\theta$ goes from $0$ to $2\pi$, the points of distance $r$ from $(c_1,c_2,c_3)$ on the plane containing $(c_1,c_2,c_3)$ perpendicular to the axis will be traced out. 

So the parameterization of the circle of radius $r$ around the axis, centered at $(c_1,c_2,c_3)$, is given by
$$x(\theta) = c_1 + r\cos(\theta)a_1 + r\sin(\theta)b_1$$
$$y(\theta) = c_2 + r\cos(\theta)a_2 + r\sin(\theta)b_2$$
$$z(\theta) = c_3 + r\cos(\theta)a_3 + r\sin(\theta)b_3$$
If your circle has a unit normal vector &lt; cos(a), cos(b), cos(c)> then depending on c, you have:

&lt; cos(t-arcsin(cos(b)/sin(c)))/sqrt(sin(t)^2 +cos(t)^2*sec(c)^2), sin(t-arcsin(cos(b)/sin(c)))/sqrt(sin(t)^2 +cos(t)^2*sec(c)^2), cos(t)*sin(c)/sqrt(cos(t)^2+sin(t)^2*cos(c)^2>  0

&lt; sin(t)*sin(a), -sin(t)*cos(a), cos(t)>    cos(c)=0

and of course, &lt; cos(t), sin(t), 0>   sin(c)=0

The first two will have t=0 be the maximum point