The following is in the documentation (MMA 10) under ParametricPlot3D -> Options -> Mesh :
ParametricPlot3D[{(2 + Cos[v]) Cos[u], (2 + Cos[v]) Sin[u],
Sin[v]}, {u, 0, 2 Pi}, {v, 0, 2 Pi}, Mesh -> 10]
You'll see that the lines for u=0 and for v=0 are missing. These can be restored by using Mesh->Full
, but then the number of lines will be the default, 15. I'd also like to have the number of lines be different in the two directions, with each one containing 0, but Mesh->{Full,10}, e.g., gives an error. Here is the image in the documentation:
Update: While the answer below works as requested, it does not work for tubes. See this example:
ParametricPlot3D[{(2 + Cos[v]) Cos[u], (2 + Cos[v]) Sin[u],
Sin[v]}, {u, 0, 2 Pi}, {v, 0, 2 Pi}, Mesh -> 10,
BoundaryStyle -> Tube[.03], MeshStyle -> Tube[.03]]
Answer
You need to use BoundaryStyle -> ...
(because 0
lies at the boundary of u
and v
ranges:
ParametricPlot3D[{(2 + Cos[v]) Cos[u], (2 + Cos[v]) Sin[u], Sin[v]},
{u, 0, 2 Pi}, {v, 0, 2 Pi}, ImageSize->500,
Mesh -> 10, BoundaryStyle ->Directive[Thick, Red]]
Update: Rendering mesh lines as Tube
s
In Version 9.0.1.0
ParametricPlot3D[{(2 + Cos[v]) Cos[u], (2 + Cos[v]) Sin[u], Sin[v]},
{u, 0, 2 Pi}, {v, 0, 2 Pi}, Mesh -> 10,
BoundaryStyle -> Tube[.03], MeshStyle -> Tube[.03]]
gives
In Version 10, you can post-process Line
s into Tube
s to get a similar result:
ParametricPlot3D[{(2 + Cos[v]) Cos[u], (2 + Cos[v]) Sin[u], Sin[v]},
{u, 0, 2 Pi}, {v, 0, 2 Pi}, Mesh -> 10,
BoundaryStyle -> Automatic, MeshStyle ->Automatic]/. Line->Tube
gives
Comments
Post a Comment