11
$\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$
0

1 Answer 1

20
$\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 and acknowledge that you have read and understand our privacy policy and code of conduct.

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