2
$\begingroup$
Plot3D[1.5 E^(-5.5 (Sqrt[x^2 + y^2] - 5)^2), {x, -6, 6}, {y, -6, 6}, 
 PlotRange -> {0, 2}, BoxRatios -> Automatic, PlotPoints -> 25]

ℛ = ParametricRegion[{x, y, 1.5 E^(-5.5 (Sqrt[x^2 + y^2] - 5)^2)},
                      {{x, -6, +6}, {y, -6, +6}}];
DiscretizeRegion[ℛ, AccuracyGoal -> 3]

The graphics processed by DiscretizeRegion are obviously incomplete.

$\endgroup$
2
  • 1
    $\begingroup$ try this ? mathematica.stackexchange.com/questions/211178/… $\endgroup$ Commented Jan 21, 2020 at 3:55
  • 4
    $\begingroup$ I am puzzled. Usually, increasing the resolution with the option MaxCellMeasure helps, but here it seem as if DiscretizeRegion would not be able to compute a decent bounding box. Providing an eplicit bounding box with DiscretizeRegion[\[ScriptCapitalR], {{-6, +6}, {-6, +6}, {-1, 2}}, MaxCellMeasure -> (1 -> 0.01)] helps, but then MaxCellMeasure option is entirely ignored. This is certainly a bug; please contact the support. $\endgroup$ Commented Jan 21, 2020 at 8:01

2 Answers 2

3
$\begingroup$

Using the second argument to specify explicit bounds (as suggested by Henrik in comments) helps remove the empty regions:

DiscretizeRegion[ℛ, {{-6, 6}, {-6, 6}, {-1, 2}}, AccuracyGoal -> 3]

enter image description here

We can not use the option PlotPoints in DiscretizeRegion directly. However, we can use the option Method and control mesh quality by injecting PlotPoints as a suboption for "Discretization":

DiscretizeRegion[ℛ, {{-6, 6}, {-6, 6}, {-1, 2}},  
 AccuracyGoal -> 3, 
 Method -> {"Discretization" -> {"MarchingCubes", PlotPoints -> 100}, 
   "PostProcessing" -> {"SmoothMesh", "ImproveBoundaries"}}]

enter image description here

Notes:

If we remove the suboption "PostProcessing" -> {"SmoothMesh", "ImproveBoundaries"} we do get a similar picture but it takes longer:

DiscretizeRegion[ℛ, {{-6, 6}, {-6, 6}, {-1, 2}},  
 AccuracyGoal -> 3, 
 Method -> {"Discretization" -> {"MarchingCubes", PlotPoints -> 100}}]

enter image description here

If we remove the suboption PlotPoints we get

DiscretizeRegion[ℛ, {{-6, 6}, {-6, 6}, {-1, 2}},  
 AccuracyGoal -> 3, 
 Method -> {"Discretization" -> {"MarchingCubes"}, 
   "PostProcessing" -> {"SmoothMesh", "ImproveBoundaries"}}]

enter image description here

$\endgroup$
2
$\begingroup$

Monge patches like the one in the OP, when expressed as a ParametricRegion[], are often troublesome to discretize without special treatment like what kglr does.

Instead, one could reformulate the surface as an ImplicitRegion[], like so:

reg = ImplicitRegion[z == 1.5 E^(-5.5 (Sqrt[x^2 + y^2] - 5)^2),
                     {{x, -6, 6}, {y, -6, 6}, {z, -1, 7}}];

tho you now have to specify a range for z as well.

With that,

DiscretizeRegion[reg, AccuracyGoal -> 3, MaxCellMeasure -> {"Length" -> 0.15}]

discretized Monge patch

$\endgroup$

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.