3
$\begingroup$

I learned how to do this:

Show[RevolutionPlot3D[{5 Cos[t], 5 Sin[t]},
  {t, -Pi/2, Pi/2}, {\[Theta], 0, 3 Pi/2}],
 RevolutionPlot3D[{Cos[t], Sin[t]},
  {t, -Pi/2, Pi/2}, {\[Theta], 0, 3 Pi/2}]]

But I would like to show the region between the two surfaces. Can someone show me how?

$\endgroup$
2

1 Answer 1

4
$\begingroup$

For this specific example (concentric spheres of radius 1 and 5 with "bite" out of it), perhaps easiest:

Quiet@RegionPlot3D[
  1 < x^2 + y^2 + z^2 < 25 && -Pi < ArcTan[y, x] < Pi/2, {x, -6, 
   6}, {y, -6, 6}, {z, -6, 6}, Mesh -> False, PlotPoints -> 50, 
  Boxed -> False, Axes -> False, Background -> Black]

enter image description here

$\endgroup$
4
  • $\begingroup$ What are you suppressing with Quiet? I tried to evaluate your expression without it, and it did not generate any messages. $\endgroup$
    – MarcoB
    May 23, 2015 at 17:34
  • $\begingroup$ @MarcoB 0/0 indeterminate for arctan warning... $\endgroup$
    – ubpdqn
    May 23, 2015 at 23:04
  • $\begingroup$ What version of MMA are you using? I am on v 10.1 on Win7-64 and I did not receive any warnings even without the Quiet. Interesting... Thanks for getting back to me anyway! $\endgroup$
    – MarcoB
    May 23, 2015 at 23:08
  • $\begingroup$ @MarcoB "10.1.0 for Microsoft Windows (64-bit) (March 24, 2015)" $\endgroup$
    – ubpdqn
    May 24, 2015 at 7:50

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