Message Boards Message Boards

2
|
8218 Views
|
3 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Drawing hemispheres

A couple of my colleagues have asked how to draw hemispheres in Graphics3D. The following lines of code show
two ways of doing this
SphericalPlot3D[{1, .5}, {\[Theta], 0, \[Pi]}, {\[Phi], 0, \[Pi]},
Axes -> False, Mesh -> False, Boxed -> False]

Graphics3D[{Sphere[], Sphere[{0, 0, 0}, .5]},
PlotRange -> {{-1, 1}, {0, 1}, {-1, 1}}, Boxed -> False]

Both results can be rotated into the desired orientation.

POSTED BY: S M Blinder
3 Replies
I just remembered another nice way for filled-in objects:
RegionPlot3D[1 <= x^2 + y^2 + z^2 <= 3 && y >= 0, {x, -2, 2}, {y, -2, 2}, {z, -2, 2},
PlotPoints -> 80, PlotStyle -> Directive[Specularity[White, 40], Orange], Mesh -> None]

POSTED BY: Sam Carrettie
Thank you Sam.  Your suggested codes do indeed work. 
POSTED BY: S M Blinder
Additionally you can do it with Plot3D:
Plot3D[{Sqrt[1 - x^2 - y^2], Sqrt[.25 - x^2 - y^2]}, {x, -1, 1}, {y, -1, 1}, Mesh -> False]

and RevolutionPlot3D:
Show[
RevolutionPlot3D[{Sin[t], Cos[t]}, {t, 0, Pi}, {s, 0, Pi}, Mesh -> False],
RevolutionPlot3D[{.5 Sin[t], .5 Cos[t]}, {t, 0, Pi}, {s, 0, Pi}, Mesh -> False]
]
POSTED BY: Sam Carrettie
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract