Finding Volume of Two Intersecting Cylinders at Arbitrary Angles – Geometry

geometry

Suppose we know the length, radius, position and orientation of two cylinders. Is there a general formula to calculate the volume of space shared by the intersection of the cylinders?

Best Answer

This answer is about the particular case in which the axes of the two cylinders meet at a point, both have the same radius, and both cylinders extend to infinity (this last assumption is to avoid complexities regarding truncated cylinder intersections). We can take the radius as $1$ and then re-scale to radius $a$ by inserting a factor of $a^3$.

Let the $x$ axis be the axis of cylinder $A$, and for some $m>0$ let the line $y=mx$ be the axis of cylinder $B$. The (signed) distance between a point $(x,y)$ and the line $y=mx$ is $\frac{y-mx}{r}$ where $r=\sqrt{1+m^2}$ Then the restriction that $(x, y)$ lies under cylinder $B$ is that $-1 \le \frac{y-mx}{r} \le 1,$ while $(x, y)$ lies under cylinder $A$ provided $-1 \le y \le 1$.

Note we're considering the part of the intersection lying above the $xy$ plane; then the height over cylinder $A$ is $\sqrt{1-y^2}$ and the height over cylinder $B$ is $\sqrt{1-\left[\frac{y-mx}{r}\right]^2}.$ These heights are the same over a point $(x, y)$ (i.e. the two cylinders intersect over that point) iff $y^2-\left[\frac{y-mx}{r}\right]^2=0$, which factors into two lines $y=-\frac{mx}{r-1}$ and $y=\frac{mx}{r+1}$. The product of these slopes is $-1$ so the lines are orthogonal.

If $L_B$ is the axis $y=mx$ of cylinder $B$, and for convenience $L_A$ is the $x$-axis, the axis of cylinder $A$, we'll use the notations $L_B^+$ and $L_B^-$ for the lines parallel to $L_B$ and one unit away from it, above and below respectively. Similar notation for $L_A^+$ and $L_A^-.$ The first two of these are the upper and lower boundaries of the projection of cylinder $B$ onto the $xy$ plane, and similarly the second two are the upper and lower boundaries of the projection of cylinder $A.$ Equations for these are

$$L_B^+ : y=mx+r \\ L_B^- : y=mx-r \\ L_A+ : y=1 \\ L_A^- : y=-1$$ The intersections of these lines consist of four points $P, Q, R, S$ which form an equilateral parallelogram. We have $$P=\left(\frac{1-r}{m}, 1\right), \ Q=\left(\frac{1+r}{m}, 1\right), \ R=\left(\frac{-1+r}{m}, -1\right), \ S=\left(\frac{-1-r}{m}, -1\right)$$ Now if we denote the origin $(0, 0)$ by $O$, we can see there are four triangular regions each having $O$ as one vertex, and two adjacent vertices of the parallelogram as the other two vertices. Above each of these triangles we know which of the two cylinders lies below the other.

It turns out that the contributions to the volume from each of these triangles (i.e. the volume of the intersection of the cylinders lying above that triangle) is the same.

This can be seen by symmetry, since e.g. the part lying above $\triangle OQR$ could be set up with the line $y=mx$ playing the role of the $x$ axis, and taking an orthogonal axis pointing downwards from $O$, so that the "old" $x$ axis is now at the same slope $m$ in this rotated and flipped coordinate system.

It remains now to find the volume over $\triangle OPQ$, which may be described as $0 \le y \le 1$ and $\frac{y(1-r)}{m} \le x \le \frac{y(1+r)}{m}$. Now over this triangle it is cylinder $A$ whose height is lower. This means we're integrating $\sqrt{1-y^2}$ over $\triangle OPQ$. At any specific $y$ the height being constant, we only need multiply by the length of the horizontal section of $\triangle OPQ$ at distance $y$ from the $x$ axis, and integrate. Thus we get $$ \int_0^1 \frac{(2r)}{m y \sqrt{1-y^2}} dy=(2r/m)\cdot(1/3).$$ Recalling that we have found only the volume above the $xy$ plane, and that there are four triangles each giving the above contribution to the part above the $xy$ plane, we arrive at $$\frac{16}{3}\cdot \frac{\sqrt{1+m^2}}{m}$$ for the volume of the intersection of the cylinders.

Note as $m \to \infty$ (so that the angle of intersection goes to 90 degrees) this formula approaches the correct $16/3$ (the usual formula $(16/3)a^3$ when $a=1.$) And also as expected it becomes infinite as $m \to 0^+.$

Added note: If $\theta$ is the angle between the two axes, then $m=\tan \theta.$ I used the letter $r$ during the derivation to mean $\sqrt{1+m^2}$ only for convenience. If we reset $r$ to now mean the common radius of the cylinders, and apply a trig identity, we can reexpress the volume in the form $$V=\frac{16}{3 \sin \theta} \cdot r^3,$$ which is only off by the $sin \theta$ divisor from the result $(16/3)r^3$ when the cylinders are orthogonal.