9
$\begingroup$

What is the source of the vertical mesh (ring) in this figure and how does one eliminate it?

SphericalPlot3D[
 Abs[.5 + Sin[2 ϕ]/2] Sin[θ] +
  Abs[.5 + Sin[2 (ϕ + π/2)]/2] Sin[θ],
 {θ, 0, π}, {ϕ, 0, 2 π},
 PlotStyle -> {Opacity[0.3], Yellow},
 BoxRatios -> {1, 1, 1/2},
 MeshFunctions -> {#3 &},
 Mesh -> 5,
 MeshStyle -> Blue]

enter image description here

$\endgroup$
19
$\begingroup$

The blue line occurs at the edge of the function, where ϕ wraps from to 0. We can get rid of it by adding BoundaryStyle -> None:

SphericalPlot3D[
 Abs[.5 + Sin[2 ϕ]/2] Sin[θ] + 
  Abs[.5 + Sin[2 (ϕ + π/2)]/2] Sin[θ], {θ, 
  0, π}, {ϕ, 0, 2 π}, 
 PlotStyle -> {Opacity[0.3], Yellow}, BoxRatios -> {1, 1, 1/2}, 
 MeshFunctions -> {#3 &}, Mesh -> 5, MeshStyle -> Blue, 
 BoundaryStyle -> None]

enter image description here

$\endgroup$

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.