1

If person wants to derive the intersection curve of the rotated cylinder with offset to ellipsoid $x^2/a^2 + y^2/b^2 + z^2/c^2 = 1$.

The equations of rotated cylinder around $y$ with angle $\phi$ plus offset $x0$ as follows.

$x=r*\cos(\theta) + x0$

$y=r*\sin(\theta)$

$z=z$

$x'=x*\cos(\phi)+z*\sin(\phi)$

$y'=y$

$z'=z*\cos(\phi)-x*\sin(\phi)$

Where $\phi$ is angle of the cylinder rotated around $y$, and $x0$ is offset in x axis.

The ellipsoid

$$ x^2/a^2 + y^2/b^2 + z^2/c^2 = 1 $$

How to derive the parametric equations of the intersection curve.

Try to derive them as follows, please correct if anything wrong:

cylinder offset $x0$ without rotation:

$x=r*\cos(\theta) + x0$

$y=r*\sin(\theta)$

$z=z$

per $$ x^2/a^2 + y^2/b^2 + z^2/c^2 = 1 $$ To ellipsoid $ a=b$ we have:

$z = c/a*sqrt[a^2-(r^2+2*r*x0*cos(\theta)+x0^2)]$

After it is rotated around $y$ axis with $\phi$:

$x'=x*\cos(\phi)+z*\sin(\phi)$

$y'=y$

$z'=z*\cos(\phi)-x*\sin(\phi)$

Per $$ x'^2/a^2 + y'^2/b^2 + z'^2/c^2 = 1 $$ we have:

$z' = c/a*sqrt[a^2-(x'^2+y'^2)]$

So, the curve of intersection ($x', y', z'$) shall be the function/parametric of $\phi$ and $\theta$.

I am confused by these two (2) sets of equations, and do not know the physic meaning of them.

$z=z$

$z = c/a*sqrt[a^2-(r^2+2*r*x0*cos(\theta)+x0^2)]$

$z'=z*\cos(\phi)-x*\sin(\phi)$

$z' = c/a*sqrt[a^2-(x'^2+y'^2)]$

The created intersection between ellipsoidal and rotated cylinder is incorrect. The cylinder contour becomes elliptical contour from elliptical rotated direction (elliptical normal direction, see the right image of the photo in red line). The intersection curve of unrotated (vertical direction) cylinder to ellipsoidal is correct LEFT image of the photo in red. Why? Or, my programming problem? Mathematics Gurus, any comments on the above equations?

John Wang
  • 19
  • 2

1 Answers1

0

Outline:

Let $V$ be the direction vector of the cylinder axis.

For each angle $\theta$, you can construct a line $L_\theta$ that lies on the surface of the cylinder. This line has a parametric equation of the form $L_\theta (t) = P_\theta + tV$, where $P_\theta$ is a point on the cylinder.

If you plug the expression for $L_\theta$ into the equation of the ellipsoid, you’ll get a quadratic equation in $t$. The solutions of this quadratic give you the two points where the line $L_\theta$ intersects the ellipsoid. As $\theta$ varies, these two points will (typically) trace out two curves where the cylinder intersects the ellipsoid. In other words, you get the parametric equations of the intersection, using $\theta$ as the parameter.

If you look at this question, you’ll get the details of intersecting a line with an ellipsoid, which is really all that’s happening in the algorithm I outlined above.

Also, you might learn something by reading about the intersection of a cylinder and a sphere. Your situation is similar.

bubba
  • 43,483
  • 3
  • 61
  • 122
  • bubba, thanks for your message and the references linked. But, I try to figure out a straight way to directly use in 3D surface modeling, deriving the intersection curve of a rotated cylinder with offset to ellipsoid. – John Wang Jan 09 '22 at 15:16