# How does one get Mesh lines at 0 in ParametricPlot3D?

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]]


• Russ, thanks for the accept. Regarding Tube issue, your code works as expected in Version 9.0.1.0 but not in Version 10. Please see the update to my answer for a suggestion to get the same result in Version 10.
– kglr
Commented Jul 15, 2014 at 17:57

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 Tubes

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 Lines into Tubes 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

• Thanks! Would you agree this is a bug in Version 10? Commented Jul 15, 2014 at 23:27
• @Russ, not sure it is a bug; especially because the usage of Tube[.03] as a Directive is -- I think -- undocumented.
– kglr
Commented Jul 15, 2014 at 23:42