# Thread: Ellipse equation from a 3d set of phasors

1. ## Ellipse equation from a 3d set of phasors

I have a set of phasors (complex numbers) x, y & z.

using a 3d vector of these, q = [x, y, z]

then real(q.e^(i*theta)) traces an ellipse in 3d space as theta is swept over the range 0->2pi

is there a way to derive the equation of this ellipse in some nicer or more general ellipse representation

such as-
u = 3d vector representing the semi-major axis
v = 3d vector representing the semi-minor axis

2. ## Re: Ellipse equation from a 3d set of phasors

Let $x = x_1, y= x_2, z = x_3$ and separate them so that $x_k = a_k + i b_k$ for $k = 1,2,3$.

Then

$e^{i\theta} = \cos \theta + i\sin \theta$

Multiply them out: $x_k e^{i\theta} = a_k \cos \theta - b_k \sin \theta + i(b_k \cos \theta + a_k \sin \theta)$

Then $\text{Re}(x_k e^{i \theta}) = a_k \cos \theta - b_k \sin \theta = \text{Re}(x_k)\cos \theta - \text{Im}(x_k) \sin \theta$.

So, $\text{Re}(qe^{i\theta}) = \text{Re}(q)\cos \theta - \text{Im}(q)\sin \theta$.

At $\theta = 0$ or $\theta=\pi$, you have $\pm \text{Re}(q)$ (making that one of your axes) and at $\theta = \dfrac{\pi}{2}$ or $\theta = \dfrac{3\pi}{2}$, you have $\mp \text{Im}(q)$ (making that the other axis).

Note: If exactly one of $\text{Re}(q),\text{Im}(q)$ is the zero vector, you get a line segment. If both are zero, you get only a point.

3. ## Re: Ellipse equation from a 3d set of phasors

I would like to remove the dependence on the initial phase offset of the phasors, making it possible to easily find out the semi-major axis.
The only way I can think of is to use Pythagoras to find the magnitude and then take the derivative to find the minimums and maximums.
It ends up being quite lengthy and doesn't take you directly to the maximum, I hoping there's an easier way.