2
$\begingroup$

I have a surface generated by the following code:

af = Pi/2; se = Sin[af/2] Sqrt[1 + Tan[Pi/2 - tt1]^2]; 
SphericalPlot3D[se, {tt1, 0, Pi}, {tt2, 0, 2 Pi}, 
 PlotStyle -> Directive[Red, Opacity[1]], PlotPoints -> 30, 
 Boxed -> False, AxesOrigin -> {0, 0, 0}, AxesLabel -> {x, y, z}, 
 TicksStyle -> Directive[FontOpacity -> 0, FontSize -> 0], 
 AxesStyle -> Directive[Black, 12], Lighting -> "Neutral", 
 MeshFunctions -> {#4 &, #3 &}, ImageSize -> 600, 
 PlotRange -> {{-1.5 Pi, 1.5 Pi}, {-1.5 Pi, 1.5 Pi}, {-1 Pi, 1 Pi}}]

The figure looks like this.

enter image description here

What I want is that the meshes about the $z$ axis to be distributed evenly, but seems the code is distributing w.r.t. my spherical parameters. I wonder how can I realize this?

Moreover, I wonder if I can control the existence and the distribution of the meshes for x,y,z, or tt1 tt2? I think I should go to the meshfunction, but didn't figure out how to use it.

$\endgroup$
  • $\begingroup$ The reason that the mesh is distributed with respect to the spherical coordinate is that you told it to. When you put #4& as one of the MeshFunctions you are telling it to place mesh with respect to the $\theta$ coordinate. Look at the section on MeshFunctions in the documentation for SphericalPlot3D and you'll see this which should explain what is happening here. $\endgroup$ – Jason B. May 11 '16 at 8:10
2
$\begingroup$
SphericalPlot3D[se, {tt1, 0, Pi}, {tt2, 0, 2 Pi}, 
 PlotStyle -> Directive[Red, Opacity[1]], PlotPoints -> 30, 
 Boxed -> False, AxesOrigin -> {0, 0, 0}, AxesLabel -> {x, y, z}, 
 TicksStyle -> Directive[FontOpacity -> 0, FontSize -> 0], 
 AxesStyle -> Directive[Black, 12], Lighting -> "Neutral", 
 Mesh -> {Range[-Pi, Pi , 2 Pi/10]}, MeshFunctions -> { #3 &}, 
 ImageSize -> 600, BoundaryStyle -> None, 
 MeshStyle -> Directive[Thick, Blue], 
 PlotRange -> {{-1.5 Pi, 1.5 Pi}, {-1.5 Pi, 1.5 Pi}, {-1 Pi, 1 Pi}}]

Mathematica graphics

$\endgroup$
  • $\begingroup$ Hi Kglr, this works perfectly, thanks a lot! $\endgroup$ – larry May 11 '16 at 2:32
  • $\begingroup$ @larry, i am glad it worked for you. Thank you for the Accept, and welcome to mma.se. $\endgroup$ – kglr May 11 '16 at 2:34

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.