I saw that question at the certain forum and answered it with help of
Mathematica 13.1 in such a way. The angles between the unit vectors
{0, 0, 1}, {-Sqrt[2/9], -Sqrt[2/3], -1/3}, {-Sqrt[2/9], Sqrt[2/3], -1/3}
and {Sqrt[8/9], 0, -1/3}
are equal because all the pairwise inner products equal -1/3
.
The first cylinder is defined as cyl1 = ImplicitRegion[x^2 + y^2 <= 1, {x, y, z}];
. The second cylinder
is made from the first one by the rotation around the origin which transforms
{0, 0, 1}
to {Sqrt[8/9], 0, -1/3}}
:
cyl2 = TransformedRegion[r1, Function[p, RotationMatrix[{{0, 0, 1}, {Sqrt[8/9], 0, -1/3}}] . {p[[1]], p[[2]], p[[3]]}]]
ParametricRegion[{{-(x/3) + (2 Sqrt[2] z)/3, y, -((2 Sqrt[2] x)/3) - z/3}, x^2 + y^2 <= 1}, {x, y, z}]
As we see, cyl2
is parametrically defined. Next, we find the intersection and volume of these cylinders:
intersect1= RegionIntersection[cyl1, cyl2]; Volume[intersect1]
4 Sqrt[2]
Now we consider the third cylinder
cyl3 = TransformedRegion[r1, Function[p, RotationMatrix[{{0, 0, 1}, {-Sqrt[2/9], Sqrt[2/3], -1/3}}] . {p[[1]], p[[2]], p[[3]]}]];
and its intersection with intersect1
intersect2 = RegionIntersection[intersect1, cyl3];
and the volume
Volume[intersect2]
4.72311
We see Mathematica fails to produce an exact result (which is of no need in the most of cases).
At last, the fourth cylinder
cyl4 = TransformedRegion[r1,Function[p, RotationMatrix[{{0, 0, 1}, {-Sqrt[2/9], -Sqrt[2/3], -1/3}}] . {p[[ 1]], p[[2]], p[[3]]}]]
, its intersection with the previous ones
intersect3 = RegionIntersection[intersect2, cyl4]
and the final volume
Volume[intersect3]
4.54725
Let us visualize
RegionPlot3D[intersect2, PlotRange -> {{-3/2, 3/2}, {-3/2, 3/2}, {-3/2, 3/2}},
PlotPoints -> 100, PlotTheme -> "Monochrome"]
RegionPlot3D[intersect3, PlotRange -> {{-3/2, 3/2}, {-3/2, 3/2}, {-3/2, 3/2}},
PlotPoints -> 100, PlotTheme -> "Monochrome"]
Is it possible to obtain an exact result for Volume[intersect3]
with Mathematica? The symmetry of intersect3
and
that answer encourage.
Edit. Minor typos (unit instead of init, cyl1 instead of r1, cyl2 instead of r2).