2
|
8021 Views
|
3 Replies
|
4 Total Likes
View groups...
Share

Drawing hemispheres

Posted 11 years ago
 A couple of my colleagues have asked how to draw hemispheres in Graphics3D. The following lines of code showtwo ways of doing thisSphericalPlot3D[{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.
3 Replies
Sort By:
Posted 11 years ago
 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 11 years ago
 Thank you Sam.  Your suggested codes do indeed work.
Posted 11 years ago
 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]