If a region which is drawn by Region function is a 2D area, we can see the region. However, if a region is a 3D region, we sometimes cannot see the region when the region is inside of something because there seems to be no option to make it transparent for Region function. I use Mathematica on Windows7.

For example, If the region I want to draw is a 2D area, Region show us what we want:

region = Disk[{0, 0}, 1];
complement = BooleanRegion[Not, {region}];

2D case

However, if the region is a 3D region, Region does not give us a relevant draw:

region2 = Ball[{0, 0, 0}, 1];
complement2 = BooleanRegion[Not, {region2}];

3D case

Then, do you know any good workaround for this frustrating matter? I know if I convert the region into a set of inequality equations, I can use RegionPlot function and the function has an opacity option but I want to know other solutions.

Any advise is appreciated.


You could cheat and convert into a (Boundary)MeshRegion, and then use MeshCellStyle.

I'll use a more interesting example:

region2 = Ball[{0, 0, 0}, 1];
complement2 = BooleanRegion[Not, {region2}];
reg = Region[complement2];

BoundaryDiscretizeRegion[reg, MeshCellStyle -> {{2, All} -> Opacity[1/2]}]

discretized region

  • $\begingroup$ Oh, I also misunderstood about Sphere, it doesn't contain the balk region. $\endgroup$ – Taiki Bessho Mar 20 '18 at 6:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.