I need to fix the resolution of the mesh lines drawn on some surfaces, and currently I don't know how. Here's a MWE to work with (a simple sphere) :

ParametricPlot3D[{Sin[t] Cos[p], Sin[t] Sin[p], Cos[t]},
{t, 0, Pi}, {p, 0, 2 Pi},
Boxed -> False,
Axes -> None, 
ImageSize -> {500, 500},
PlotPoints -> {7, 7},
Mesh -> {3, 7},
SphericalRegion -> True]

If you rotate around this ball, you'll notice that the three circular mesh curves don't have a nice and regular polygonal shape around the ball. The polygons are irregular, and it's ugly.

How can I make the black mesh lines to look more regular, without changing the PlotPoints ? Or what combination of PlotPoints and Mesh (plus some other commands ?) would make the nicest plot, i.e. regular mesh curves everywhere ?

  • $\begingroup$ One of the mesh lines seems to be "missing" in the result of your code as well: see the bottom left corner of image. $\endgroup$
    – MarcoB
    Mar 9, 2016 at 22:12
  • $\begingroup$ Yes, there's a line missing. The only way I know to add its black line is to add BoundaryStyle -> Automatic. I think it's because of some hidden boundary between phi = 0 and phi = 2Pi. $\endgroup$
    – Cham
    Mar 9, 2016 at 22:22
  • $\begingroup$ @Cham Do you consider the result with Mesh->All to be a good one? $\endgroup$ Mar 10, 2016 at 2:13
  • $\begingroup$ Increasing PlotPoints (try 20) works well in combination with MaxRecursion (try 3). $\endgroup$
    – Carl
    Mar 16, 2021 at 2:44

1 Answer 1


This work around seems to give good results. We specify both (i) mesh lines and (ii) a slightly redundant range for p:

ParametricPlot3D[{Sin[t] Cos[p], Sin[t] Sin[p], Cos[t]}, {t, 0, 
  Pi}, {p, 0, 201/100 Pi}, Boxed -> False, Axes -> None, 
 ImageSize -> {500, 500}, Mesh -> {10, Range[0, 2 \[Pi], 2 \[Pi]/12]},
  SphericalRegion -> True]

enter image description here

Without the mesh lines or the range redundancy we get less regular lines. For example:

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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