WOLFRAM NOTEBOOK

Intersection of a Plane and Cylinder

plane orientation
n
lat
0.
n
lon
0.
plane distance from origin
d
2.
cylinder center position
c
x
2.
c
yz
0.
1.
cylinder orientation
w
lat
0.
w
lon
0.
cylinder height and radius
h
3.
r
1.
cylinder and plane opacity
0.7
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

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
n
normal to the plane (brown arrow) and a distance from the origin
d
. The cylinder is defined by its center coordinate
c
, a vector along the cylinder axis
w
(blue arrow and line), its radius
r
and height
h
. An intersection between the plane and cylinder exists if the following is true:
n·(c-dp)r
1-n·w
+
h
2
n·w
.
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
h
. Thin green lines are trim lines where the planes of the two cylinder caps intersect with the plane
(n,d)
. If the intersection ellipse crosses these green trim lines, they bound the intersection set.
Special cases arise when the cylinder axis
w
is parallel to the plane normal
n
(see Snapshot 3, where the intersection is a disk) or the cylinder axis
w
is perpendicular to the plane normal
n
(see Snapshot 4 where the intersection is a rectangle).

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

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
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.