I tried to draw intersection of a plane and a cone.
Hyperbola
Clear["Global`*"]
myh = 5;
myr = 4;
pA = {0, 0, myh};
pT = {0, 0, 2*myh};
pO = {0, 0, 0};
cone1 = Cone[{pO, pA}, myr];
cone2 = Cone[{pT, pA}, myr];
plane = InfinitePlane[{{0, -3, 0}, {1, 2, 3}, {2, 3, 2}}];
plotcone1 =
RegionPlot3D[DiscretizeRegion@RegionIntersection[cone1, plane],
BoundaryStyle -> {Thick, Red}, PlotStyle -> None, Boxed -> False,
PlotRange -> All];
plotcone2 =
RegionPlot3D[DiscretizeRegion@RegionIntersection[cone2, plane],
BoundaryStyle -> {Thick, Red}, PlotStyle -> None, Boxed -> False,
PlotRange -> All];
Show[plotcone1, plotcone2,
Graphics3D[{Opacity[0.8], cone1, cone2, plane}, Boxed -> False]]
Parabola
Clear["Global`*"]
myh = 5;
myr = 4;
pA = {0, 0, myh};
pT = {0, 0, 2*myh};
pO = {0, 0, 0};
cone1 = Cone[{pO, pA}, myr];
cone2 = Cone[{pT, pA}, myr];
plane = InfinitePlane[{{0, 2, 0}, {1, 2, -1}, {2, 2, 0}}];
plotcone1 =
RegionPlot3D[DiscretizeRegion@RegionIntersection[cone1, plane],
BoundaryStyle -> {Thick, Red}, PlotStyle -> None, Boxed -> False,
PlotRange -> All];
plotcone2 =
RegionPlot3D[DiscretizeRegion@RegionIntersection[cone2, plane],
BoundaryStyle -> {Thick, Red}, PlotStyle -> None, Boxed -> False,
PlotRange -> All];
Show[plotcone1, plotcone2,
Graphics3D[{Opacity[0.8], cone1, cone2, plane}, Boxed -> False]]
I input the plane = InfinitePlane[{{0, -3, 0}, {1, 2, 3}, {2, 3, 2}}];
by hand. How can I input InfinitePlane
to get conic sections automatically? Can I input InfinitePlane
in the form a x + b y + c z + d = 0
?