Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.8K Views
|
2 Replies
|
1 Total Like
View groups...
Share
Share this post:

Custom MeshFunctions in SphericalPlot3D

Posted 10 years ago

Hello,

Whenever I try to modify the MeshFunctions which SphericalPlot3D uses, Mathematica plots an additional mesh line in the xz-plane. For example

x := Sin[\[Phi]]*Cos[\[Theta]]
y := Sin[\[Phi]]*Sin[\[Theta]]
z := Cos[\[Phi]]
SphericalPlot3D[
5*x^2 + 10*y^2 + 3*z^2, {\[Phi], 0, 2 \[Pi]}, {\[Theta], 0, \[Pi]},
ColorFunction -> (ColorData["TemperatureMap"][#6] &),
MeshFunctions -> {#6 &},
Mesh -> {8}
]

results in

enter image description here

Does anyone know what's causing this behaviour and how to stop it? I'm using Mathematica 10.0.1.0 Student Edition.

Thank you!

2 Replies

What you are seeing is the boundary of the parametric surface, at theta=0 and theta=Pi. To get rid of the boundary use BoundaryStyle:

With[{x = Sin[\[Phi]]*Cos[\[Theta]], y = Sin[\[Phi]]*Sin[\[Theta]], 
  z = Cos[\[Phi]]},
 SphericalPlot3D[
  5*x^2 + 10*y^2 + 3*z^2, {\[Phi], 0, 2 \[Pi]}, {\[Theta], 0, \[Pi]},
   ColorFunction -> (ColorData["TemperatureMap"][#6] &), 
  MeshFunctions -> {#6 &}, Mesh -> {8}, BoundaryStyle -> None]]
POSTED BY: Gianluca Gorni

Thank you very much! This completely resolves the issue.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard