I am attempting to cut out holes in a sphere, circumscribed around a regular tetrahedron. To do so I define some points (p1 through p4 are the vertices of a tetrahedron)
p0 = {0, 0, 0};
p1 = a {0, 0, Sqrt[2/3] - 1/(2 Sqrt[6])};
p2 = a {-(1/(2 Sqrt[3])), -(1/2), -(1/(2 Sqrt[6]))};
p3 = a {-(1/(2 Sqrt[3])), 1/2, -(1/(2 Sqrt[6]))};
p4 = a {1/Sqrt[3], 0, -(1/(2 Sqrt[6]))};
Then I cimcumsribe a sphere around that:
S2 = Circumsphere[{p1, p2, p3, p4}];
Next, create a cylinder that goes from the center of the sphere (also the center of the "tetrahedron" to a vertex of the imaginary tetrahedron:
C1 = Cylinder[{p0, p1}, 5];
Take the RegionDifference (I.e. cut out the cylinder):
RD1 = RegionDifference[S2, C1];
And plot:
RegionPlot3D[RD1, PlotPoints -> 30, Axes -> True]
But this returns a blank graph!! Why?
[I know the theory should work because if instead of using a sphere I use an actual tetrahedron (and points in the center of each face) it works fine. (see code below)
a = 10 (*Edge Length*);
p1 = a {0, 0, Sqrt[2/3] - 1/(2 Sqrt[6])};
p2 = a {-(1/(2 Sqrt[3])), -(1/2), -(1/(2 Sqrt[6]))};
p3 = a {-(1/(2 Sqrt[3])), 1/2, -(1/(2 Sqrt[6]))};
p4 = a {1/Sqrt[3], 0, -(1/(2 Sqrt[6]))};
T1 = Tetrahedron[{p1, p2, p3, p4}];
h1 = (p1 + p2 + p3)/3;
hc = (p1 + p2 + p3 + p4)/4;
C1 = Cylinder[{h1, hc}, .5];
RD1 = RegionDifference[T1, C1];
RegionPlot3D[RD1, PlotPoints -> 20, Axes -> True, PlotRange -> All]
]
Sphere
from aCircumsphere
by callingSimplify
on it (for some reason Circumsphere documentation is online-only in 10.1 - maybe a bug). I think the problem rests withCylinder
. There seems to be a lot of illogical stuff and missing features like 3D Region intersections for meshes in Mathematica as well. $\endgroup$