What's the parametric equation of a partial ellipse in 3D space with given major axis and minor axis and start point and end point?

4.2k Views Asked by At

Consider a partial ellipse in 3D space with the following information:

  1. majorAxis (a 3D vector, such as [1, 0, 0])
  2. minorAxis (a 3D vector, such as [0, 1, 0])
  3. startPoint (a 3D vector, such as [1, 0, 0])
  4. endPoint (a 3D vector, such as [0, 0.5, 0])
  5. centerPoint (a 3D vector, such as [0, 0, 0])
  6. majorRadius (a scalar value, such as 1)
  7. minorRadius (a scalar value, such as 0.5).

Then, how to find the parametric equation of this partial ellipse?

2

There are 2 best solutions below

5
On

It’s really no different that it would be in 2-D: if the center is $\mathbf c$ and the semiaxes are defined by the vectors $\mathbf u$ and $\mathbf v$ (the lengths of these vectors are the half-axis lengths), then a parameterization of the ellipse is $\mathbf c+(\cos t)\mathbf u+(\sin t)\mathbf v$.

If you just need an arc of this ellipse, then you will have to find an appropriate interval for $t$. An easy way to do this is to map everything to the unit circle: Let $A = \small{\begin{bmatrix}\mathbf u&\mathbf v\end{bmatrix}}$ and let $M=(A^TA)^{-1}A^T$. Then $\phi:\mathbf p\mapsto M(\mathbf v-\mathbf c)$ maps your ellipse to the unit circle in $\mathbb R^2$ such that the major and minor axes are mapped to the coordinate axes. The above parameterization is simply the inverse image of the unit circle $(\cos t,\sin t)^T$, so by applying $\phi$ to the end points of the arc, you can compute suitable values of $t$ for them.

0
On

From the generic parametric equation

$$\mathbf x = \mathbf c+(\cos t)\mathbf u+(\sin t)\mathbf v$$

i.e.,

$$\mathbf x =\begin{pmatrix}c_1\\c_2\\c_3\end{pmatrix}+\cos(t)\begin{pmatrix}u_1\\u_2\\u_3\end{pmatrix}+\sin(t)\begin{pmatrix}v_1\\v_2\\v_3\end{pmatrix}$$

$$\mathbf x =\begin{pmatrix}c_1\\c_2\\c_3\end{pmatrix}+\begin{pmatrix}u_1 \cos(t)+v_1 \sin(t)\\u_2 \cos(t)+v_2 \sin(t)\\u_3 \cos(t)+v_3 \sin(t)\end{pmatrix}\tag{1}$$

given by @amd, let me give a a form that can be handy for manupulating arcs of 3D ellipses.

It suffices to know that any expression of the form $a \cos(t)+b \sin(t)$ can be written

$$a \cos(t)+b \sin(t)=n \cos(\alpha)\cos(t)+n \sin(\alpha)\cos(t)$$

for a certain $\alpha$, where $n$ is the norm of vector $\binom{a}{b}$ and $\alpha$ its polar angle. Otherwise said:

$$a \cos(t)+b \sin(t)=n \cos(t-\alpha)$$

Thus (1) becomes :

$$\mathbf x =\begin{pmatrix}x\\y\\z\end{pmatrix}=\begin{pmatrix}c_1\\c_2\\c_3\end{pmatrix}+\begin{pmatrix}n_1 \cos(t-\alpha_1)\\n_2 \cos(t-\alpha_2)\\n_3 \cos(t-\alpha_3)\end{pmatrix}\tag{2}$$

It remains to adapt the domain of variation of $t$. This ellipse looks to depend on 9 parameters. In fact $c_1, c_2, c_3$ are obtained apart. Let us now see how one can obtain say for the initial point adequate values for the 6 remaining parameters $n_1,n_2,n_3$ and $\alpha_1,\alpha_2,\alpha_3$ ; setting for example $t=0$, one gets a first set of 3 equations ; then one must recall that $\mathbf u$ and $\mathbf v$ are unit vectors (this gives 2 more equations) and are orthogonal (1 more equation). Thus we have 6 equations for 6 unknowns that should have a solution (we assume here a certain faisability ; but, to be honest, a discussion should take place here).