TransWikia.com

Eccentricity of an ellipse

Mathematica Asked on June 30, 2021

I would like to calculate the eccentricity of the intersection between a cylinder and a plane when I change their relative orientation.

reg1 = 
  RegionIntersection[
    Cylinder[{{0, 0, 1}, {0, 0, -1}}, 1/2], 
    InfinitePlane[{{1, 0, 0}, {0, 1, 0}, {0, 0, 0}}]];
reg2 = 
  RegionIntersection[
    Cylinder[{{0, 0, 1}, {0, 0, -1}}, 1/2], 
    InfinitePlane[{{1, 0, 1}, {0, 1, 0}, {0, 0, 0}}]];
Show[
  Region[reg1],
  Region[reg2],
  Graphics3D[
    {{Opacity[0.2], Cylinder[{{0, 0, 1}, {0, 0, -1}}, 1/2]}}]]

However, when I try:

ComponentMeasurements[Graphics[reg1], "Eccentricity"]
ComponentMeasurements[Graphics[reg2], "Eccentricity"]

In both cases I get ‘0.0744841’ as the answer.

I am open to alternative ways of doing this calculation.

3 Answers

Assume that you want to turn the second plane around the y axis by the angle "phi". Then you would have the following equations:

eq1 = {x^2 + y^2 == 1/4, z == 0};
eq2 = {x^2 + y^2 == 1/4, x Tan[phi] == z};

Manipulate[
 orig = {0, 0, 0}; ap1 = {0, 1, 0}; ap2 = {1, 0, Tan[phi]};
 Show[{Graphics3D[{PointSize[0.02], Point[{orig, ap1, ap2}], 
     Line[{{orig, ap1}, {orig, ap2}}]}], 
   ParametricPlot3D[{{Cos[p], Sin[p], Cos[p] Tan[phi]}, {Cos[p], 
      Sin[p], 0}}, {p, 0, 2 Pi}, 
    Epilog -> {Text["{1,0,1}", {1, 1}]}]}, PlotRange -> 2 {-1, 1}]
 , {{phi, 0.5}, 0, Pi/2}]

Correct answer by Daniel Huber on June 30, 2021

As ellipses and circles are curves and not areas, it is better to treat them as such. Toward this aim we may specify:

Cylinder: x^2 + y^2 == 1/4

plane1: z==0

plane2: x==z

The intersections between cylinder and planes are specified by requesting that both equations must be fulfilled simultaneously:

eq1 = {x^2 + y^2 == 1/4, z == 0};
eq2 = {x^2 + y^2 == 1/4, x == z};
orig = {0, 0, 0}; ap1 = {0, 1, 0}; ap2 = {1, 0, 1};
Show[{Graphics3D[{PointSize[0.02], Point[{orig, ap1, ap2}], 
    Line[{{orig, ap1}, {orig, ap2}}]}],
  ParametricPlot3D[{{Cos[p], Sin[p], Cos[p]}, {Cos[p], Sin[p], 
     0}}, {p, 0, 2 Pi}, Epilog -> {Text["{1,0,1}", {1, 1}]}]
  }]

enter image description here

The first intersection is a circle.The eccentricity of a circle is zero by definition, so there is nothing to calculate. The second intersections is an ellipse. The length of the minor and major axes as well as the eccentricity are obtained by:

Print["semi minor axis=", b = Norm[ap1]]
Print["semi major axis=", a = Norm[ap2]]
Print["eccentricity= ", Sqrt[(a^2 - b^2)/a] // N]

Answered by Daniel Huber on June 30, 2021

You can use a little vector algebra and trigonometry to reckon out the length of the major axis of the ellipse formed as the cross-section of a plane cutting a cylinder. (The minor axis is, of course, the same as the radius of the cylinder.) Here's a short demo:

With[{r = 1/2, pts = {{1, 0, 1}, {0, 1, 0}, {0, 0, 0}}},
     Block[{tr, vv},
           vv = Normalize[Cross[#1 - #2, #3 - #2] & @@ pts];
           tr = Composition[Quiet[RotationTransform[{{0, 0, 1}, vv}],
                                  RotationTransform::spln], 
                            If[Norm[Most[vv]] != 0, 
                               RotationTransform[{{1, 0, 0}, Append[Most[vv], 0]}], 
                               AffineTransform[IdentityMatrix[3]]]];
           Show[Graphics3D[{Opacity[1/2], Cylinder[{{0, 0, 1}, {0, 0, -1}}, r],
                            InfinitePlane[pts]}], 
                ParametricPlot3D[tr[r {Cos[t]/Last[vv], Sin[t], 0}] // Evaluate,
                                 {t, 0, 2 π}],
                PlotLabel -> StringForm["e=``", Sqrt[1 - Last[vv]^2]]]]]

cross-section of cylinder

The code given above makes three assumptions: first, the cylinder's axis is the $z$-axis; second, the cutting plane always passes through the origin; and lastly, the cutting plane can be always expressed as $ax+by+cz=0,quad cne0$. I leave the generalization of the code above to the interested reader.

Answered by J. M.'s torpor on June 30, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP