Intersection of a Plane and Cylinder
Intersection of a Plane and Cylinder
This Demonstration determines if a cylinder and a plane intersect and if so, constructs the intersection. You can control the orientation of the plane and distance from the origin. You can control the cylinder position, orientation and size. The intersection is, in general, an ellipse that may be cropped. If the cylinder orientation is perpendicular to the plane, the intersection is a circle. If the cylinder orientation is parallel to the plane, the intersection is a rectangle.
Details
Details
The code in this Demonstration was transcribed to Wolfram Language from the C++ intersection of a cylinder and a plane algorithm by David Eberly [1]. The plane is defined by a vector normal to the plane (brown arrow) and a distance from the origin . The cylinder is defined by its center coordinate , a vector along the cylinder axis (blue arrow and line), its radius and height . An intersection between the plane and cylinder exists if the following is true:
n
d
c
w
r
h
n·(c-dp)≤rn·w
1-n·w
+h
2
The full derivation and detailed explanation can be found in [2].
Use the sliders to change the configuration of the plane and the cylinder. The intersection set is drawn with a red polygon. A thin red outline shows the intersection for a cylinder with infinite height . Thin green lines are trim lines where the planes of the two cylinder caps intersect with the plane . If the intersection ellipse crosses these green trim lines, they bound the intersection set.
h
(n,d)
Special cases arise when the cylinder axis is parallel to the plane normal (see Snapshot 3, where the intersection is a disk) or the cylinder axis is perpendicular to the plane normal (see Snapshot 4 where the intersection is a rectangle).
w
n
w
n
References
References
[1] D. Eberly. "IntrPlane3Cylinder3.h." Geometric Tools. (July 24, 2024) www.geometrictools.com/GTE/Mathematics/IntrPlane3Cylinder3.h.
[2] D. Eberly. "Intersection of a Cylinder and a Plane." Geometric Tools. (July 30, 2024) www.geometrictools.com/Documentation/IntersectionCylinderPlane.pdf.
External Links
External Links
Permanent Citation
Permanent Citation
Aaron T. Becker, Victor M. Baez, Nikhil Navkar
"Intersection of a Plane and Cylinder"
http://demonstrations.wolfram.com/IntersectionOfAPlaneAndCylinder/
Wolfram Demonstrations Project
Published: September 12, 2024