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