I have come across some strange behaviour in the function BoundaryDiscretizeRegion[], using Mathematica 11.0.0 on Mac OSX 10.11.6.

It seems like the option MaxCellMeasure no longer changes the quality of the mesh.

Using the example from the Wolfram documentation (here), under scope/quality

BoundaryDiscretizeRegion[Disk[], MaxCellMeasure -> #] & /@ {1, 0.1, 

I get the following as output:

Example of meshing bug

clearly no change in the mesh quality.

Is this a known bug or should it be reported?

Strangely this doesn't seem to be a problem for Implicit Regions at least in 3D e.g.

dodeq = z^6 - 5 (x^2 + y^2) z^4 + 5 (x^2 + y^2)^2 z^2 - 
   2 (x^4 - 10 x^2 y^2 + 5 y^4) x z + (x^2 + y^2 + z^2)^3 - (x^2 + 
      y^2 + z^2)^2 + (x^2 + y^2 + z^2) - 1;
BoundaryDiscretizeRegion[ImplicitRegion[dodeq <= 0, {x, y, z}], 
   MaxCellMeasure -> #] & /@ {1, 0.1, 0.01}

which gives:

example of implicit region


1 Answer 1


Change that to, "no apparent change in the mesh quality".

meshes = 
  BoundaryDiscretizeRegion[Disk[], MaxCellMeasure -> #] & /@ {1, 0.1, 0.01};
Length@*MeshCoordinates /@ meshes
ListPlot@*MeshCoordinates /@ meshes
(* {42, 63, 629} *)

enter image description here

Now it's more clear you are getting a better mesh, you just can't see the change visibly. It's like comparing a 42-sided regular polygon to a 630-sided regular polygon, they both look like circles. In 3D the changes are just more visible.

  • $\begingroup$ Thanks for the information! Is there however a maximum size that is now implemented that wasn't implemented before? For example when I do meshes = BoundaryDiscretizeRegion[Disk[], MaxCellMeasure -> #] & /@ {5, 2, 1}; Length@*MeshCoordinates /@ meshes ListPlot@*MeshCoordinates /@ meshes I get the same number of mesh points. Is some other parameter controlling this like AccuracyGoal ? $\endgroup$
    – Dunlop
    Oct 4, 2016 at 14:04
  • 1
    $\begingroup$ It seems that there is a shape-dependent minimum number of points coded in to define a mesh region. Which makes sense, you wouldn't make a mesh region from a circle and use 4 points. For a Disk or Ellipsoid in 2D, I can't get less than 42 points. For a Rectangle though, I can get as low as 4 points, and any general polygon can't have fewer mesh points than points that make up the polygon. This makes it seem to me that when the system renders a Disk, it renders like RegularPolygon[42] $\endgroup$
    – Jason B.
    Oct 4, 2016 at 14:33
  • 2
    $\begingroup$ @JasonB It's not shape dependent but AccuracyGoal dependent: meshes = BoundaryDiscretizeRegion[Disk[], MaxCellMeasure -> #, AccuracyGoal -> 1] & /@ {1, 0.1, 0.01}; $\endgroup$
    – user21
    Oct 4, 2016 at 16:48
  • $\begingroup$ @user21 - That makes sense, since with a Rectangle you can reduce the number of points to 4 without changing the accuracy. There still seems to be a minimum for Disk and Ellipsoid primitives - I can't find a combination of AccuracyGoal and MeshCoordinates that will turn a Disk[] into a triangle (it can be an octagon though) $\endgroup$
    – Jason B.
    Oct 4, 2016 at 16:56
  • $\begingroup$ for reference in v10.1 the coordinate counts for the 3 cases are {9, 89, 889} i.e. much coarser for the 1 case. Of course you cant call this a bug since the criterea is a "maximum". $\endgroup$
    – george2079
    Oct 4, 2016 at 21:04

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.