# Where is wrong in this code to plot intersection of a plane and a sphere?

I am trying to plot the circle is intersection of the sphere with center O(0,0,0) and radius R and the plane z = h. I tried

R = 4;
h = R - 5;
p = {0, 0, h};
v = {0, 0, 1};
sph = Sphere[{0, 0, 0}, R];
hp = Hyperplane[p, v];
reg = RegionIntersection[sph, hp];
Graphics3D[{{Opacity[.5], sph}, {Opacity[.5], hp}, {Opacity[.5],
reg}}, Boxed -> False]


I cannot get the result. How can I get correct result?

• DiscretizeRegion@reg Aug 2 at 3:01
• Never use upper-case letters for your variables (e.g., $R$), as they can conflict with internal naming conventions. Aug 2 at 3:25
• @DavidG.Stork Thank you very much. Aug 2 at 3:28
• Graphics3D[{{Opacity[.5], sph}, {Opacity[.5], hp}, {Opacity[.5], HighlightMesh[ DiscretizeRegion[reg], {Style[1, Thickness[.01], Red], Style[0, None]}]}}, Boxed -> False] Aug 2 at 4:06