# RegionPlot3D Empty

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)};
p2 = a {-(1/(2 Sqrt)), -(1/2), -(1/(2 Sqrt))};
p3 = a {-(1/(2 Sqrt)), 1/2, -(1/(2 Sqrt))};
p4 = a {1/Sqrt, 0, -(1/(2 Sqrt))};


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)};
p2 = a {-(1/(2 Sqrt)), -(1/2), -(1/(2 Sqrt))};
p3 = a {-(1/(2 Sqrt)), 1/2, -(1/(2 Sqrt))};
p4 = a {1/Sqrt, 0, -(1/(2 Sqrt))};

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]


] • I can demonstrate more things that work/don't work if necessary, or explain further. I tried to hit the right balance of minimal code and full explanations above. – andrewmh20 May 29 '15 at 2:12
• You can get the Sphere from a Circumsphere by calling Simplify on it (for some reason Circumsphere documentation is online-only in 10.1 - maybe a bug). I think the problem rests with Cylinder. There seems to be a lot of illogical stuff and missing features like 3D Region intersections for meshes in Mathematica as well. – Histograms May 29 '15 at 2:50
• @Histograms What should that change, even theoretically? In practice the problem persists. What makes you think the problem is with Cylinder? – andrewmh20 May 29 '15 at 2:55

The problem lies with using Sphere (or Circumsphere), which are actually surfaces rather than solids. Instead use Ball:

a = 1;
p0 = {0, 0, 0};
p1 = a {0, 0, Sqrt[2/3] - 1/(2 Sqrt)};
p2 = a {-(1/(2 Sqrt)), -(1/2), -(1/(2 Sqrt))};
p3 = a {-(1/(2 Sqrt)), 1/2, -(1/(2 Sqrt))};
p4 = a {1/Sqrt, 0, -(1/(2 Sqrt))};
cs = Circumsphere[{p1, p2, p3, p4}];
cyl = Cylinder[{p0, p1}, 0.05];
rd = RegionDifference[Ball[cs[], cs[]], cyl];
rd2 = RegionDifference[rd, Cylinder[{p0, p2}, 0.05]];
rp1 = RegionPlot3D[rd, Boxed -> False, Axes -> False,
Background -> Black, PlotStyle -> Opacity[0.5], PlotPoints -> 100]
rp2 = RegionPlot3D[rd2, Boxed -> False, Axes -> False,
Background -> Black, PlotStyle -> Opacity[0.5], PlotPoints -> 100] • What are you doing with "Ball"? It's not the smaller holes that makes it work, but the using Ball as the region. Why? – andrewmh20 May 29 '15 at 3:07
• @andrewmh20 I am taking centre and radius of circumsphere and then Ball generates the region (x-xc)^2+(y-yc)^2+(z-zc)^2<=r^2. – ubpdqn May 29 '15 at 3:09
• But circumsphere is supposed to be usable as a region on it's own...Just like cylinder and tetrahedron. So why is ball necessary? (It also degrades the quality when compared to a pure sphere) – andrewmh20 May 29 '15 at 3:10
• @andrewmh20 I suggest you run the following: Volume[cs], RegionDimension[cs], RegionMeasure[cs] and 4 Pi cs[]^2. You will notice the circumsphere is a surface and the measures and surface area coincide. Hence use of Ball – ubpdqn May 29 '15 at 3:15
• That is the usual meaning of Sphere. It is also documented by "Sphere represents the shell {x | ||x - p|| = r}". – ilian May 29 '15 at 14:39