3

I have a spheroid $S$ with $a$ is the equatorial radius, and $b$ is the polar radius, and ($a>b$)

I would get the intersection between $S$ and a plane $P: ux+vy+wz+d=0$

Then calculating the semi-axis major and minor and the center of this intersection.

There is always an intersection (resulting an ellipse, a circle, or a point), so no empty intersection.

My try:

From $P$, I get $x = (d-vy-wz)/u$, then I substituted this $x$ into the equation of $S$, I got a general equation of conic in the form $Ay^2+Byz+Cz^2+Dy+Ez+F=0$

Comparing that to my intersection's equation, I get:

$A=bv^2+bu^2$

$B=2vwb^2$

$C=bw^2+au^2$

$D=2dvb^2$

$E=2dwb^2$

$F=b^2d^2-a^2b^2u^2$

I calculated $θ$ then I rotated in order to remove yz-term.

then the new coefficients are:

$A'= Acos^2(θ) + Bcos(θ)sin(θ) + Csin^2(θ)$

$B'= 0$

$C'= Asin^2(θ) - Bcos(θ)sin(θ) + Ccos^2(θ)$

$D'= Dcos(θ)+ Esin(θ)$

$E'= -Dsin(θ) + Ecos(θ)$

$F'= F$

calculating the semi-axis major and minor of the intersection $a'$ and $b'$

$a'=sqrt((-4F'A'C' + C'D'^2 + A'E'^2)/(4A'C'^2))$

$b'=sqrt((-4F'A'C' + C'D'^2 + A'E'^2)/(4A'^2C'))$

The coordinates of the intersection's center $C$ are $y'_c$ and $z'_c$:

$y'_c= -D'/2A'$

$z'_c= -E'/2C'$

rotating back by $θ$ to get the coordinates $y_c$ and $z_c$, I got:

$y_c = y'_ccos(θ) - z'_csin(θ)$

$z_c = y'_csin(θ) + z'_ccos(θ)$

My question: I compared these results with geogebra, I found that these semi-axis major and minor $a'$ and $b'$ are of the intersection projected onto the yOz plane, not of the intersection itself in 3D, also the same problem with the coordinates of the center $C$, that it must be given in 3D coordinates!

Any help please

Khaled
  • 237
  • Is it just assumed or given that the intersection is not the empty set? because in general, there may be no intersection -- for example $2x^2+y^2+z^2 = 4$ does not intersect with $x+y+z=100$. – Mark Fischler Jun 18 '18 at 18:27
  • the intersection in my case cannot be empty but no problem if anyone can help me as if it were a general case :) – Khaled Jun 18 '18 at 18:30

2 Answers2

2

Equation of spheroid:

$$\frac{x^2+y^2}{a^2}+\frac{z^2}{b^2}=1 \tag{1}$$

Let $(X,Y,Z)$ be the centre of the section, then equation of plane section is

$$\frac{Xx+Yy}{a^2}+\frac{Zz}{b^2}=\frac{X^2+Y^2}{a^2}+\frac{Z^2}{b^2} \tag{2}$$

Comparing coefficients,

$$-\frac{(u,v,w)}{d}= \frac{\left( \dfrac{X}{a^2}, \dfrac{Y}{a^2}, \dfrac{Z}{b^2} \right)} {\dfrac{X^2+Y^2}{a^2}+\dfrac{Z^2}{b^2}} \implies (X,Y,Z)=- \frac{d\left( \dfrac{u}{a^2}, \dfrac{v}{a^2}, \dfrac{w}{b^2} \right)}{\dfrac{u^2+v^2}{a^2}+\dfrac{w^2}{b^2}}$$

$(1)-(2)\times 2$,

$$\frac{(x-X)^2+(y-Y)^2}{a^2}+\frac{(z-Z)^2}{b^2}=1-\frac{X^2+Y^2}{a^2}-\frac{Z^2}{b^2}$$

which is a re-scaled spheroid of $(1)$ translated by $(X,Y,Z)$.

Intersection occurs only when $$\lambda^2=1-\dfrac{X^2+Y^2}{a^2}-\dfrac{Z^2}{b^2} \ge 0$$

By symmetry, putting

  • $z=Z$ gives the vertices on the major axis;

  • $(x,y)=k(X,Y)$ gives the vertices on the minor axis.

With an aid of Mathematica,

  • the semi-major axis is $$a\sqrt{1-\frac{X^2+Y^2}{a^2}-\frac{Z^2}{b^2}}$$

  • the semi-minor axis is $$ \frac {ab\sqrt{ \left( 1-\dfrac{X^2+Y^2}{a^2}-\dfrac{Z^2}{b^2} \right) \left( \dfrac{X^2+Y^2}{a^4}+\dfrac{Z^2}{b^4} \right)}} {\sqrt{\dfrac{X^2+Y^2}{a^2}+\dfrac{Z^2}{b^2}}}$$

Ng Chung Tak
  • 18,990
  • Thanks for you time and your effort, let's take $(x/50)^2+(y/50)^2+(z/46)^2=1$ intersecting $2x+3y-z+8=0$ I compared your results of semi-axis major and minor and those of the coordinates of the center with GeoGebra, I got:

    Your Results:

    semi-major = 49.953360... semi-minor = 46.424176... and the coordinates of center (-1.128232...,-1.692348...,0.666488...)

    and those of Geogebra: semi-major = 49.953757... semi-minor = 46.211659... and the coordinates of center (-1.155535...,-1.733302...,0.489022...)

    Where is the problem?

    – Khaled Jun 19 '18 at 13:57
  • I found some errors in Geogebra, the intersecting conic doesn't fit the with the ellipsoid. Try smaller values of $a$ and $c$ to reduce round off errors. – Ng Chung Tak Jun 19 '18 at 15:30
  • Ok, could you ensure for me that the results I got from your answer's formulae are true, I gave you a numerical example with numerical results, in other way, were your results for my numerical example exact like my results?!! thank you again, I'm surprised of Geogebra :( – Khaled Jun 19 '18 at 15:38
1

Your idea of reducing this to a two-dimensional problem is a good one, but you have to reduce it to the right one. Instead of projecting onto the $y$-$z$ plane as you did, you need to find a coordinate system for the plane, i.e., come up with a rotation and translation that maps the plane to, say, the $x$-$y$ plane. Simply projecting onto a coordinate plane doesn’t really do what you need. The image of the intersection ellipse could well be a circle, in which case you wouldn’t be able to find any axes, and by the same token, the projection of a circle might be an ellipse, which would give you spurious major and minor axes.

For the translation, the center of the intersection conic would be convenient for the further calculations that you need to do, but we don’t have that yet, so any point on the plane will do. After translating, you need an orthogonal transformation that will map the plane’s unit normal $\mathbf n = (u,v,w)^T/\sqrt{u^2+v^2+w^2}$ to $(0,0,1)^T$—the unit $z$-vector. A common approach is to find a unit vector $\mathbf u$ that’s orthogonal to $\mathbf n$. A suitable rotation matrix is then $\begin{bmatrix}\mathbf u & \mathbf n\times\mathbf u & \mathbf n\end{bmatrix}^T$. I find that a reflection is often more convenient since the resulting matrix is symmetric and is its own inverse. Let $\mathbf w = \mathbf n - (0,0,1)^T$. Using the well-know formula, a reflection matrix that maps $\mathbf n$ to $(0,0,1)^T$ is then $I - 2{\mathbf w \mathbf w^T \over \mathbf w^T\mathbf w}$. Once you’ve transformed the equation of the spheroid, set $z=0$ and proceed as before.

The center of the intersection conic can be computed directly using pole-polar relationships. Observe that for a unit sphere, the pole of a plane lies on the perpendicular line to the plane through the origin, and that the origin, this pole and the center of the circle of intersection of sphere and plane are all colinear. The spheroid can be obtained from the unit sphere via an affine transformation, which preserves colinearity, pole-polar relationships and centers of conics, so the center of the intersection of the spheroid and plane is the intersection of the plane with the line through the origin and its pole. There are various ways to compute this intersection. I find a matrix computation in homogeneous coordinates convenient in this case since having the origin be one of the points makes most of the terms vanish: The plane is $\mathbf\pi=[u,v,w,d]^T$, its pole is $$\mathbf p = \operatorname{diag}(a^2,a^2,b^2,-1)\mathbf\pi = \left[a^2u,a^2v,b^2w,-d\right]^T$$ and setting $\mathbf q=[0,0,0,1]$, the origin, we have for the line-plane intersection $$(\mathbf p\mathbf q^T-\mathbf q\mathbf p^T)\mathbf\pi = \left[a^2du,a^2dv,b^2dw,-(a^2u^2+a^2v^2+b^2w^2)\right]^T$$ which dehomogenizes to the point $$-{d \over a^2u^2+a^2v^2+b^2w^2} \left(a^2u,a^2v,b^2w\right).$$ This point could also have been computed by scaling the spheroid to a unit sphere and applying the same map to the plane, computing the simpler center of intersection and then transforming back.

amd
  • 53,693