# Intersection of sphere and region below a plane-DiscretizeRegion was unable to discretize the region ImplicitRegion

I am trying to create a geometric object represented by the intersection of a sphere and the space below a plane using ImplicitRegion. When I use the sphere alone, it works. When I use the plane alone, it also works... But when I use them both together, it does not work! I get the error message "DiscretizeRegion was unable to discretize the region ImplicitRegion".

 (* A sphere by itself works *)
reg1 = DiscretizeRegion[
ImplicitRegion[
x^2 + y^2 + z^2 == 1 && -40 <= x <= 40 && -40 <= y <= 40 && -20 <=
z <= 40, {x, y, z}]];

(* The region below a given plane alone works *)
reg2 = DiscretizeRegion[
ImplicitRegion[-(64/(3 Sqrt)) + (16 x)/3 - (16 y)/3 + (16 z)/
3 <= 0 && -40 <= x <= 40 && -40 <= y <= 40 && -20 <= z <=
40, {x, y, z}]];

(* The sphere and region below the plane together does not work *)
reg12 = DiscretizeRegion[
ImplicitRegion[
x^2 + y^2 + z^2 ==
1 && -(64/(3 Sqrt)) + (16 x)/3 - (16 y)/3 + (16 z)/3 <=
0 && -40 <= x <= 40 && -40 <= y <= 40 && -20 <= z <= 40, {x, y,
z}]];

Show[reg1, reg2, reg12]


Any idea how to make it work for the Implicit Region defined by both the sphere and the plane?

• The intersection seems be the empty set. With x^2 + y^2 + z^2 == 10, it works for me. I have to admit, the error message is pretty useless... – Henrik Schumacher Oct 8 '17 at 16:31
• Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! – Michael E2 Oct 8 '17 at 16:50
• Yes, I agree. It works if the sphere intersects the plane... But for some reason it does not work when the sphere is totally immersed inside the region of R3 delimited by the plane. Is'nt the result supposed to be the entire sphere? – Karl_Heineker Oct 8 '17 at 17:41
• The option Method -> "Semialgebraic" seems to work. – Chip Hurst Oct 28 '17 at 18:39

This is indeed strange behavior of DiscretizeRegion... Have a look at this simplified example:

DiscretizeRegion[ImplicitRegion[x^2 + y^2 + z^2 == 1 && x + y + z <= 3, {x, y, z}]]


DiscretizeRegion::drf: DiscretizeRegion was unable to discretize the region ImplicitRegion[<<2>>].

So this does not work, while as Henrik and Karl pointed out it works if the regions do not completely overlap:

DiscretizeRegion[ImplicitRegion[x^2 + y^2 + z^2 == 10 && x + y + z <= 3, {x, y, z}]]


This outputs the correct region. Interestingly it also works if the plane is "simple":

DiscretizeRegion[ImplicitRegion[x^2 + y^2 + z^2 == 1 && x <= 3, {x, y, z}]]


Mathematica does not immediately recognize that some of the equations/inequalities do not add any further restrictions. A workaround is to first simplify your constraints.

DiscretizeRegion[
ImplicitRegion[
Evaluate@FullSimplify[x^2 + y^2 + z^2 == 1 && x + y + z <= 3,
Assumptions -> {x ∈ Reals, y ∈ Reals, z ∈ Reals}], {x, y, z}]]


reg12 = DiscretizeRegion[