Parametric Equation of a Circle in 3D Space?

92.5k Views Asked by At

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!

4

There are 4 best solutions below

0
On

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

0
On

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

3
On

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

0
On

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.