How can I graph the solid that lies above the cone $z=\sqrt{x^2+y^2}$ and below the sphere $x^2+y^2+z^2=z$?

I tried SphericalPlot3D[1, {\[Theta], 0, \[Pi]/4}, {\[Rho], 0, 2}] which doesn't give me a solid, how do I do this?

Sorry I am a beginner with mathematica


3 Answers 3



RegionPlot3D[z >= Sqrt[x^2 + y^2] && x^2 + y^2 + z^2 <= z, {x, -.5, .5}, {y, -.5, .5}, {z, 0, 1}]

enter image description here

  • $\begingroup$ What if I want to use spherical coordinates? $\endgroup$
    – suomynonA
    Aug 20, 2019 at 6:03
  • $\begingroup$ You could define an ParametricRegion for the sphere in spherical coordineates. But the cartesian formulation is much more easy. I think! $\endgroup$ Aug 20, 2019 at 7:52
  • $\begingroup$ Can you show me the spherical method for it please? $\endgroup$
    – suomynonA
    Aug 21, 2019 at 0:41
  • $\begingroup$ Try something linke halfsphere = ParametricRegion[{r {Sin[\[Theta]] Cos[\[Phi]], Sin[\[Theta]] Sin[\[Phi]], Cos[\[Theta]]} + {0, 0, 1/2}, (0 <= r <= 1/2) && (0 <= \[Theta] <= Pi/2) && (-Pi <= \[Phi] <= Pi) }, {r, \[Theta], \[Phi]}] . Should work in MMA v12 (Sorry I couldn't test it in v11) $\endgroup$ Aug 21, 2019 at 7:57

You can also combine two RevolutionPlot3Ds using Show:

Show[RevolutionPlot3D[{t, t}, {t, 0, 1/2}], 
  RevolutionPlot3D[{Cos[t] / 2, Sin[t] / 2 + 1/2}, {t, 0, Pi}], 
  PlotRange -> All]

enter image description here


You asked to do this in spherical coordinates so see if this is good enough for you.


That r is zero outside the range of the cone, increases rapidly to make up the surface of the cone and then is 1 to make up the sphere on top of the cone.

That doesn't give a perfect cone because the tip and junction between the cone and the sphere aren't well rendered in the plot. You can increase the PlotPoints to make this better.


Better rendering while still using SphericalPlot3D


You could use this method to graph a variety of surfaces in spherical coordinates.

As a hint, I found the coefficients of -10*phi+5/2*Pi by Solve[{m (Pi/4-1/10)+b == 0, m Pi/4+b == 1},{m,b}]


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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