9
$\begingroup$

Bug introduced in 10.2.0 or earlier and fixed in 11.0.0


I define an implicit region like

R = ImplicitRegion[
  0 < Sin[u]/Cos[v] < 1 && 
   0 < Sin[v]/Cos[u] < 1, {{u, 0, 2}, {v, 0, 2}}]

But when I try to do

DiscretizeRegion[R]

Mathematica 10.4 seems to hang and doesn't return any result. This is strange, because the region is really just a simple triangle

RegionPlot[0 < Sin[u]/Cos[v] < 1 && 0 < Sin[v]/Cos[u] < 1, {u, 0, 2}, {v, 0, 2}]

triangle

and discretization of a more complex region like

DiscretizeRegion[ImplicitRegion[0 < Sinh[u]/Cosh[v] < 1 && 0 < Sinh[v]/Cosh[u] < 1, 
                 {{u, 0, 2}, {v, 0, 2}}]]

works without problems. What is the problem with my implicit triangle?

$\endgroup$
  • $\begingroup$ I can confirm that this problem is also present in MM 10.2 running on Mac OS. $\endgroup$ – Michael Seifert Apr 18 '16 at 22:20
  • $\begingroup$ With version 10.4 on Windows 7 x64 DiscretizeRegion[R] returns the result after 6m34s of work on my system (screenshot). $\endgroup$ – Alexey Popkov Apr 19 '16 at 0:40
  • 1
    $\begingroup$ Could you report this as a bug to Wolfram Research and add information on the case number they give to it? $\endgroup$ – kirma Apr 19 '16 at 3:58
  • $\begingroup$ I reported a bug to Wolfram and they opened CASE:3585657. They also said, that DiscretizeRegion can be sped up by specifying the Method to use (e.g. Boolean or RegionPlot), e.g. DiscretizeRegion[R, Method -> "RegionPlot"] . $\endgroup$ – asmaier May 1 '16 at 20:03
7
$\begingroup$

Looks like you've uncovered a bug. I can confirm this behavior in 10.3.1 and 10.4. You can still discretize your region using DiscretizeGraphics though:

r = DiscretizeGraphics@
     RegionPlot[0 < Sin[u]/Cos[v] < 1 && 0 < Sin[v]/Cos[u] < 1, {u, 0, 2}, {v, 0, 2}]

Mathematica graphics

And if you want finer areas, use DiscretizeRegion:

DiscretizeRegion[r, MaxCellMeasure -> 0.001]

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.