3
$\begingroup$

Question

How come MaxCellMeasure works in 2D but fails in 3D?

Indeed if I try

Table[DiscretizeRegion[ImplicitRegion[x^2 + y^2 <= 1, {x, y}], 
   MaxCellMeasure -> res] // {#, ByteCount[#]} &, {res, {1, 0.1, 
   0.01}}]// Transpose

Mathematica graphics

It works as expected (i.e. the quality of the mesh, and its size increases). Whereas this does not

Table[DiscretizeRegion[
    ImplicitRegion[x^2 + y^2 + z^2 == 1, {x, y, z}], 
    MaxCellMeasure -> res] // {#, ByteCount[#]} &, {res, {1, 0.1, 
    0.01}}] // Transpose

Mathematica graphics

Let me apologize in advance if this is a RTFM question. The documentation is such a maze on these new (cool) Mesh features.

Comment

Note that this fails but only partially:

Table[DiscretizeRegion[
    ImplicitRegion[x^2 + y^2 + z^2 <= 1, {x, y, z}], 
    MaxCellMeasure -> res] // {#, ByteCount[#]} &, {res, {1, 0.1, 
    0.01}}] // Transpose

Mathematica graphics

which might be a clue??

$\endgroup$
  • $\begingroup$ Related: mathematica.stackexchange.com/questions/56613/…. See if the workaround there works for you. (It says the bug has been fixed as of 10.0.2, but...) $\endgroup$ – Michael E2 Jun 13 '15 at 14:10
  • $\begingroup$ Try replacing MaxCellMeasure -> res with MaxCellMeasure -> {"Area" -> res} $\endgroup$ – RunnyKine Jun 13 '15 at 15:31
4
$\begingroup$

As @RunnyKine mentioned, Try replacing MaxCellMeasure -> res with MaxCellMeasure -> {"Area" -> res} seems to partially work:

Table[DiscretizeRegion[
    ImplicitRegion[x^2 + y^2 + z^2 == 1, {x, y, z}], 
    MaxCellMeasure -> {"Area" -> res}] // {#, 
     ByteCount[#]} &, {res, {1, 0.1, 0.01}}] // Transpose

Mathematica graphics

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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