4
$\begingroup$

I'm having trouble plotting a revolution surface with intersections. What I have done is shown in the figure, with the help of SphericalPlot3D: The desired shape without cross-section yet.

But I can't plot the two cross-sections to make it an enclosed surface. And the final style I like to achieve is like the figure below: enter image description here

i.e., I'd like to have enclosed surface, with different types of meshes if possible, moreover, I wonder if I can plot something without color of the surface, just like the desired style?

Below are the code I used to generate figure 1:

r = -16/(5 π) (θ - 0.5 π)^2 + π;
s1 = SphericalPlot3D[{r},
       {θ, 0, Pi}, {ϕ, 0, 3.2 π/2}, 
       PlotStyle -> Directive[White, Opacity[1]],
       PlotPoints -> 30, 
       Boxed -> False,
       AxesOrigin -> {0, 0, 0}, 
       TicksStyle -> Directive[FontOpacity -> 0, FontSize -> 0], 
       AxesStyle -> Directive[Black, 12], 
       Mesh -> {Range[-π, π, 0.04 π], Range[0, 2 π, 2 π], {}}, 
       ImageSize -> 1000, 
       PlotRange -> {{-1.5 π, 1.5 π}, {-1.5 π, 1.5 π}, {-1 π, 1 π}}
      ]

Thanks a lot!

$\endgroup$
  • $\begingroup$ Try Lighting -> "Neutral" $\endgroup$ – J. M. is away Mar 29 '16 at 17:00
  • $\begingroup$ Hi @J.M., this does work for the color issue, btw, do you have any idea how to enclosing the surface? Thanks a lot! $\endgroup$ – larry Mar 29 '16 at 17:58
6
$\begingroup$

With addition to your SphericalPlot3D you can trnsform the equation and plot the boudary with ParametricPlot3D.

Show[ (*your plot with fixed lighting*)
 SphericalPlot3D[{-16/(5 \[Pi]) (\[Theta] - 0.5 \[Pi])^2 + \[Pi]}, 
   {\[Theta], 0, Pi}, {\[Phi], 0, 3.2 \[Pi]/2}, 
   PlotStyle -> Directive[White, Opacity[1]], 
   PlotPoints -> 30, Boxed -> False, AxesOrigin -> {0, 0, 0}, 
   TicksStyle -> Directive[FontOpacity -> 0, FontSize -> 0], 
   AxesStyle -> Directive[Black, 12], 
   Mesh -> {Range[-\[Pi], \[Pi], 0.04 \[Pi]], Range[0, 2 \[Pi], 2 \[Pi]], {}}, 
   ImageSize -> 1000, Lighting -> {{"Ambient", White}}
 ],
 ParametricPlot3D[ (*boundaries*)
   Evaluate[ CoordinateTransform[
      "Spherical" -> "Cartesian", 
      {(-16/(5 \[Pi]) (\[Theta] - 0.5 \[Pi])^2 + \[Pi]) rr, \[Theta], #}]],
      {\[Theta], 0, Pi}, {rr, 0, 1}, 
   PlotStyle -> White, 
   MeshFunctions -> {# &, #2 &, #3 &}, 
   Lighting -> {{"Ambient", White}}
 ] & /@ {-.4 \[Pi], 0}
]

enter image description here

$\endgroup$
  • $\begingroup$ Thanks a lot, this is exactly what I want! $\endgroup$ – larry Apr 20 '16 at 20:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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