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.


  • 4
    $\begingroup$ If you're mapping the path of a satellite, they generally move in an ellipsoidal path. $\endgroup$ Sep 9, 2014 at 14:33

6 Answers 6


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$$

  • 1
    $\begingroup$ Simple and intuitive. Just set up vectors a and b like you would a 2-dimensional x and y axis, then do the normal circle equations. $\endgroup$ Mar 1, 2013 at 9:12
  • 1
    $\begingroup$ any clues on how to write similar equation for ellipse? $\endgroup$
    – mkuse
    Apr 29, 2014 at 17:40
  • 6
    $\begingroup$ If you replace the $r\cos \theta$ by ${r \over c} \cos \theta$ and replace the $r\sin\theta$ by ${r \over d} \sin \theta$ and you get a corresponding ellipse with axes of length $c$ in the $(a_1,a_2,a_3)$ direction and length $d$ in the $(b_1,b_2,b_3)$ direction. $\endgroup$
    – Zarrax
    Apr 30, 2014 at 23:37

I think an easy way to visualize this is to see it as a bunch of transformation matrices.

A circle is just $SRx$ where

$x = \left[\matrix{1\\0\\0}\right],$

$S = rI$ is a scale matrix, and

$R = \left[\matrix{\cos\theta & \sin\theta & 0 \\ \sin\theta & -\cos\theta & 0 \\ 0 & 0 & 1}\right]$

is a a rotation matrix:

Now, you want rotate that whole circle to some arbitrary direction in three dimensions, so we need a three-dimensional rotation matrix $T$, and we need an translation vector $k$. A circle is then:

$TSRx + k.$


Is your "slope of the axis in the x,y and z axes" the direction cosines? You need a center $c$ as well, presumably a point on the axis. Given the unit vector $\vec{v}$ along the axis one way is to find two perpendicular unit vectors. As long as $\vec{v}$ is not along the $x$ axis, you can normalize $\vec{v} \times (1,0,0)$ for one and call it $\vec{a}$, then let $\vec{b}=\vec{v} \times \vec{a}$. Then your satellite location is $c+R\cos\omega t\vec{a}+R\sin \omega t\vec{b}$


For this answer, I make a few (not too drastic) assumptions:

  1. The circle you are interested in is centered at the origin (thus, the plane your circle lies in has to pass through the origin).

  2. The plane your circle lies in is already in Hessian normal form, $\mathbf{\hat n}\cdot\langle x\;y\;z\rangle=0$, where $\mathbf{\hat n}$ is a unit normal vector to your plane.

  3. The plane is not any one of the coordinate planes (and in those cases, you wouldn't need to go through this route).

What you can use to derive the parametric equations for your circle is the Rodrigues rotation formula, which is a rotation matrix used for rotating by an angle $\varphi$ about an arbitrary axis $\mathbf{\hat n}=\langle n_x\;n_y\;n_z\rangle$. Letting

$$\mathbf W=\begin{pmatrix}0&-n_z&n_y\\n_z&0&-n_x\\-n_y&n_x&0\end{pmatrix}$$

the Rodrigues rotation matrix is

$$\mathbf R(\varphi)=\mathbf I+\sin\,\varphi\mathbf W+2\sin^2\frac{\varphi}{2}\mathbf W^2$$

Thus, to assemble the parametric equations for your circle: pick any point in your plane whose distance from the origin is equal to the radius of your circle, and then apply the Rodrigues rotation formula to that point. The axis to use is the unit normal vector in the Hessian normal form of your plane, and the rotation angle is the varying parameter in your parametric equations. That is, if $\mathbf p$ is a point at a distance $r$ from the origin, and satisfies $\mathbf{\hat n}\cdot\mathbf p=0$, then $\mathbf r(t)=\mathbf R(t)\cdot\mathbf p$ is the vector equation for your circle.


Using standard spherical coordinates for a sphere surface $( a,\theta,\phi)$ we have parametrization for axis on z-axis:

$$ (x,y,z) = (a \cos \phi \cos \theta +h, a \cos \phi \sin \theta+k, a \sin \phi+l) $$

for a sphere whose center is displaced from origin to $(h,k,l).$

A great circle is formed by intersection of an inclined plane through sphere center inclined at angle $\alpha$ to z-axis.

To choose a great circle on the spherical surface we have to find a relation $f(\theta,\phi)=0. $

An implicit function relating $ \theta,\phi$ for great circle is given as:

$$ \cos \phi \tan \alpha = \sin \theta \sin \phi + \frac{\cos \theta \sin \alpha}{\sqrt{\cos^2 \phi - \sin ^2 \alpha}} $$

It is found from conditions imposed for planar / zero torsion condition and geodesy condition. Proper sign to be chosen depending on which octant we are in. Sketched in Mathematica ContourPlot for three inclinations $ (45^0, 60^0, 75^0).$

Euler rigid body rotations are to be applied by matrix multiplication for direction cosines of given axis.



If your circle has a unit normal vector < cos(a), cos(b), cos(c)> then depending on c, you have:

< 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

< sin(t)*sin(a), -sin(t)*cos(a), cos(t)> cos(c)=0

and of course, < cos(t), sin(t), 0> sin(c)=0

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

  • 2
    $\begingroup$ Welcome to math.SE! Please note that you can use LaTeX to render equations more readable $\endgroup$ Jul 3, 2013 at 6:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .