3

Given is an arbitrarily oriented ellipse in $\mathbb{R}^3$ that is by parallel projection mapped onto $xy$- and $zy$-planes. How can I derive the directions and lengths of the semi-axes of the original ellipse from the $2$ projections? (There might be $2$ solutions that are related by reflection. Knowing a single solution is sufficient.)

What is known? (see here)

  • the projected shapes must be also ellipses
  • the semi-axes of the original ellipses are in general after projection not semi-axes of the planar ellipses
  • projected semi-axes of the original ellipse are conjugated diameters of the planar ellipse and in general not perpendicular

Possible solution strategy

Consider all conjugated diameters (i.e. tangential parallelograms) of the $2$ planar ellipses to find that combination that is the projection of semi-axes of the original ellipse.

3 Answers3

2

The projection onto the $xy$ plane (parallel to the $z$ axis) of the original ellipse defines an elliptical cylinder whose axis is parallel to the $z$ axis. And similarly the projection onto the $yz$ plane (parallel to the $x$ axis) of the original ellipse defines an elliptical cylinder whose axis is parallel to the $x$ axis. The equations of the these cylinders are, respectively,

$ (r-r_0)^T Q_1 (r-r_0) = 1 $ and $ (r-r_0)^T Q_2 (r-r_0) = 1 $, where

where $r = [x, y, z]^T$, and $r_0$ is the center of the original ellipse which can be found directly from the centers of of the two projections, and,

$Q_1 = \begin{bmatrix} R_1 D_1 R_1^T && 0_{2 \times 1} \\ 0_{1 \times 2} && 0 \end{bmatrix} $

$Q_2 = \begin{bmatrix} 0 && 0_{1 \times 2} \\0_{2 \times 1} && R_2 D_2 R_2^T \end{bmatrix} $

where $D_1, D_2$ are $2 \times 2$ diagonal matrices containing the reciprocal of the squares of the semi-axes lengths of the projected ellipses, and $R_1$ is a $2 \times 2$ rotation matrices with respect to the $x, y$ axes and $ R_2$ is a $2 \times 2$ rotation matrix with respect to the $y$ and $z$ axes.

Now we simply subtract the two equations, this leads to,

$ (r - r_0)^T (Q_1 - Q_2) (r - r_0) = 0$

Since we know that there are non-trivial solutions to this equation, then $\text{rank} (Q_1 - Q_2) $ must be $2$ (see remark below).

Thus, we can diagonalize $(Q_1 - Q_2)$ into

$Q_1 - Q_2 = R D R^T $

where one of the diagonal elements of $D$ is zero, one is positive, and one is negative. Define $p = R^T (r - r_0)$ then

$ p^T D p = 0 $

Assume that $D_{33} = 0$, and $D_{11} =\alpha \gt 0$ and $D_{22} = - \beta \lt 0 $, then

$ \alpha {p_1}^2 - \beta {p_2}^2 = 0 $

Hence, the vector $p$ can parameterized as

$p = t (1, \pm \sqrt{\dfrac{\alpha}{\beta} } , 0 ) + s (0, 0, 1) = t v_1 + s v_2 $

Hence $p$ lies in a plane spanned by $v_1, v_2$. (Actually, from the above expression, it is evident that there are two such planes).

Back to the expression for $r$, we have

$r = r_0 + R p = r_0 + t R v_1 + s R v_2 = r_0 + t w_1 + s w_2 $

Hence, all we have to do now is intersect this plane spanned by $w_1 , w_2$ with the cylinder $ (r - r_0)^T Q_1 (r - r_0) = 1$.

Before we do that, we need to create two mutually orthogonal unit vectors $u_1, u_2$ that span the plane. Noting that $w_1$ is perpendicular to $w_2$, we only to have normalize $w_1, w_2$. Thus let $u_1 = w_1 /\| w_1 \|$ and $u_2 = w_2 /\|w_2 \| $, Define the $3 \times 2 $ matrix $W = [u_1, u_2]$ , and the $2 \times 1$ vector $ u = [ t' , s' ]^T $

Then $ r = r_0 + W u $

Plug this into $(r - r_0)^T Q_1 (r - r_0) = 1 $ you end up with $u^T W^T Q_1 W u = 1$

One last step, diagonalize the $2 \times 2$ matrix $(W^T Q_1 W)$ into $R_w D_w R_w^T$, then the eigenvalues $(W^T Q_1 W)$ which are the diagonal elements of $D_w$ are simply the reciprocals of the semi-major and semi-minor axes lengths of the original ellipse. And the direction of the axes can be found using the rotation matrix $R_w$, this is because

$ u^T W^T Q_1 W u = u^T R_w D_w R_w^T u = v^T D_w v = 1 $ , where $ v = R_w^T u $

And we thus have $r = r_0 + V u = r_0 + V R_w v $

Thus the direction of the axes is given by the columns of the $3 \times 2$ matrix $V R_w$

We can even parameterize the original ellipse by solving $v^T D_w v = 1$ to be

$v = [ a \cos \theta , b \sin \theta ] $ , where $a \gt b$

It is assumed that $D_{w{11}} \lt D_{w{22}} $

Then,

$r = r_0 + (V R_w) [a \cos \theta, b \sin \theta ]^T $

Remark: $\text{rank}(Q_1-Q_2)$ can also be $1$ in the special case where the plane of the original ellipse is perpendicular to the $xy$ plane or the $yz$ plane, resulting in a projection that is a straight line segment and not an ellipse in the normal sense. In this case, the plane of the original ellipse can be determined from the line segment, in the $xy$ plane and $z$ axis, or the line segment in the $yz$ plane and the $x$ axis, , and the solution method described above still applies.

Note that if the rank of $(Q_1 - Q_2)$ is $1$ then we will have $D_{11} \ne 0$ while $D_{22} = D_{33} = 0$ In this case, the plane in which vector $p$ lies is spanned by $(0, 1, 0)$ and $(0, 0, 1)$. The rest of the procedure detailed above remains the same.

Hosam Hajeer
  • 21,978
  • Does this also work if I know only approximate parameters of the projected ellipses? Then I get an approximate solution or no solution? – granular_bastard Sep 27 '21 at 13:16
  • In the case of approximate parameters, then $\text{rank}(Q_1 - Q_2) $ will be $3$, in which case $(r - r_0)^T (Q_1 - Q_2) (r - r_0) = 0$ represents an empty set (if $(Q_1 - Q_2)$ is positive definite or negative definite), or a cone (if $(Q_1 - Q_2) $ is indefinite). If it is a cone (with vertex at $r_0$), then the original ellipse is the intersection of this cone with the $Q_1$ cylinder or the $Q_2$ cylinder (they both give the same ellipse). And there are two possible ellipses for this intersection, although the details of how to compute the intersection are not clear to me. – Hosam Hajeer Sep 27 '21 at 15:09
1

Note first of all that the two projected ellipses are related among them: their points corresponding to the same point of the original ellipse have the same $y$ coordinate. In particular, the two points on the original ellipse having maximum and minimum $y$ coordinate ($C$ and $D$ in figure below) are mapped to the points with maximum and minimum $y$ coordinate on both projections.

Moreover, perpendicular projection preserves parallelism and the midpoint of segments. Hence conjugate diameters and center of the original ellipse are mapped to conjugate diameters and center of the projections. This suggests the following construction.

In the $xy$ projected ellipse (blue in figure below) construct diameter $A_1B_1$, perpendicular to $y$ axis and parallel to $x$ axis. In the $yz$ projected ellipse (red in figure below) construct diameter $A_2B_2$, also perpendicular to $y$ axis.

With the help of a chord $P_1Q_1$, parallel to $A_1B_1$, construct then diameter $C_1D_1$ in the blue ellipse, conjugate of $A_1B_1$. Likewise, construct diameter $C_2D_2$ in the red ellipse, conjugate to $A_2B_2$. Note that the tangents at $C_1$, $C_2$, $D_1$, $D_2$ are perpendicular to $y$ axis, hence those points have maximum and minimum $y$ coordinate and correspond to points $C$, $D$ on the original ellipse.

Sending from $C_1$, $D_1$ lines parallel to $z$ axis, and from $C_2$, $D_2$ lines parallel to $x$ axis, we can then construct diameter $CD$ of the original ellipse. Likewise from $A_1B_1$ and $A_2B_2$ we can construct diameter $AB$ of the original ellipse, conjugate to $CD$. In this case we have two possible pairings: either $A_1A_2$ and $B_1B_2$ (as in figure below) or $A_1B_2$ and $B_1A_2$.

In any case, having found two conjugate diameters, the original ellipse is fully determined. Its axes, if needed, can be found with the geometrical construction explained here.

enter image description here

EDIT.

To help visualise the solution, I added another figure with both possible ellipses. Note that they have diameter $CD$ in common.

enter image description here

Intelligenti pauca
  • 50,470
  • 4
  • 42
  • 77
  • $M_1$ is the center of $P_1Q_1$? The given link to find the axes from the conjugated diameters considers an ellipse in a plane, here we have an ellipse in $\mathbb{R}^3$. – granular_bastard Sep 27 '21 at 23:07
  • @granularbastard Yes, all midpoints of chords parallel to $A_1B_1$ are aligned to form the conjugate diameter. And, by the way, the ellipse IS in a plane and all its geometrical properties hold: you can repeat the construction given there in this case too. – Intelligenti pauca Sep 28 '21 at 07:51
  • $O_1,O_2$ are the projections of $O$ ? – granular_bastard Sep 28 '21 at 11:34
  • @granularbastard Yes, they are. But they are not needed in the construction. – Intelligenti pauca Sep 28 '21 at 11:59
  • @granularbastard I mean: $O_1$ and $O_2$ are the centers of the projected ellipses, hence they are known. From them it is easy to find the center $O$ of the black ellipse, but I didn't use that construction explicitly. – Intelligenti pauca Sep 28 '21 at 13:06
  • @granularbastard Pairing $C_1C_2-D_1D_2$ is forced, because $C$ and $D$ are, respectively, the points on the ellipse with maximum and minimum $y$, and they map to the points, on both projections, with maximum and minimum $y$. You cannot repeat this reasoning for $AB$, where two pairings are possible. – Intelligenti pauca Oct 17 '21 at 06:21
  • @granularbastard I added another figure, to help you see both solutions. – Intelligenti pauca Oct 17 '21 at 15:51
  • @granularbastard That GeoGebra figure is not very useful, as I started from the ellipse in space to construct then its projections. I could make a GeoGebra file with the real construction and share it, if you think it can be useful. But there is no "code" in GeoGebra. – Intelligenti pauca Oct 17 '21 at 17:50
  • Yes you can share. I am missing in the answer a hint why this construction schema works at all. – granular_bastard Oct 17 '21 at 23:43
  • Here's the GeoGebra costruction: https://www.geogebra.org/m/tmjuchh3 – Intelligenti pauca Oct 18 '21 at 07:01
  • @granularbastard I also added some explanation at the beginning of my answer. – Intelligenti pauca Oct 19 '21 at 14:47
  • So C,D are the maxima, minima in y-direction and A,B are on a line perpendicular to y-axis that goes through the origin. Why these 4 points form conjugate diameters and why they are preserved in the projection? – granular_bastard Oct 19 '21 at 21:37
  • If $AB$ is a diameter of an ellipse, its conjugate is the diameter $CD$ such that tangents at $C$ and $D$ are parallel to $AB$. Parallel lines are mapped to parallel lines in the projection, hence the projections of $AB$ and $CD$ are conjugate diameters of the projected ellipse. – Intelligenti pauca Oct 19 '21 at 21:45
  • How do we know that the tangents at the points of maximum and minimum y, i.e. tangents at points C and D, are parallel to line AB? – granular_bastard Oct 19 '21 at 23:37
  • @granularbastard Tangents at $C$ and $D$ lie on planes perpendicular to $y$ axis (otherwise their $y$ coordinate wouldn't be an extremum). And line $AB$ also lies on a plane perpendicular to $y$ axis. Hence... – Intelligenti pauca Oct 20 '21 at 07:23
  • So the problem reduces to projections of bounding parallelograms. In a sketch that contains only parallelograms one would easier see this? – granular_bastard Oct 20 '21 at 12:12
  • @granularbastard What do you mean by "bounding parallelograms", exactly? – Intelligenti pauca Oct 20 '21 at 13:04
  • Each edge of the bounding parallelogram is parallel to one of the conjugate diameters. – granular_bastard Oct 20 '21 at 19:55
  • @granularbastard In that case it is exactly the same thing: the midpoints of the sides of the parallelograms are $ABCD$ and their projections. – Intelligenti pauca Oct 20 '21 at 19:58
0

You can't.

Consider the congruent ellipses

  • $\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$ on $xy$-plane (project along $z$-axis)
  • $\frac{z^2}{a^2}+\frac{y^2}{b^2}=1$ on $yz$-plane (project along $x$-axis)

Which $\theta\in(0,\frac\pi2)\cup(\frac\pi2,\pi)$ would give you the plane $x\cos\theta+z\sin\theta=0$ that the ellipse come from? There is no way to tell between $x+z=0$ and $x-z=0$. Can you see why you can't determine the direction of the axes in general?

user10354138
  • 33,239
  • That's wrong as the semi-axes $a,b$ of the projected ellipses are in general not identical. – granular_bastard Sep 27 '21 at 00:46
  • 1
    They don't need to be, but if you can't even do this case when the algebra is much cleaner, you don't have any reason to expect you can do it in general and indeed the same thing happen (exercise for you). – user10354138 Sep 27 '21 at 00:55
  • When you say "There is no way to tell between x+z=0 and x−z=0.", I think that the OP is conscious of that when he says "There might be 2 solutions that are related by reflection." (which is evident when you see the issue as the intersection of preimages, i.e., the two possible ellipses as intersection of cylinders). – Jean Marie Sep 27 '21 at 07:32
  • 1
    @JeanMarie Well, this answer was originally written for version 4 or 5 of the question (edit: it was version 5 I think). "There might be 2 solutions that are related by reflection" was not in the question. – user10354138 Sep 27 '21 at 07:51
  • 1
    @user10354138: Even it was initially not included that there might be 2 symmetrical solutions, it does not mean that one cannot derive the original ellipse. To have 2 solutions does not mean that there is no solution. – granular_bastard Sep 27 '21 at 10:19