2
$\begingroup$

So I tried plotting an annulus in two ways:

RegionPlot[Annulus[{0,0},{a,b}]]
Graphics[Annulus[{0,0},{a,b}]]

Why does RegionPlot give a fractal looking thing? (see below for when a=1; b=5;) RegionPlot image

*note, I used wolfram programing lab.

$\endgroup$
9
  • $\begingroup$ What are $a$ and $b$ here? $\endgroup$
    – mjw
    Mar 29, 2019 at 20:03
  • $\begingroup$ Try a=1; b=5; But really any values give something weird $\endgroup$
    – ions me
    Mar 29, 2019 at 20:08
  • 4
    $\begingroup$ Because it discretized the region in order to plot it, and it is showing the underlying triangulation mesh. $\endgroup$
    – MarcoB
    Mar 29, 2019 at 20:12
  • 1
    $\begingroup$ @IonSme I guess they just use different defaults for plotting; the Graphics result is "normal-looking" though. $\endgroup$
    – MarcoB
    Mar 29, 2019 at 20:17
  • 2
    $\begingroup$ There are some subtle differences going on how Mma shows Regions and RegionPlot Graphics. Also Regions can be defined analytically via ImplicitRegion or ParametricRegion or as 'flat' MeshRegions. DiscretizeRegion converts every type to a MeshRegion and some functions like RegionPlot might use something similar to DiscretizeRegion under the hood to make plotting easier, whose discretization it for some reason decides to show. Like others wrote you can use ImplicitRegion to get a different (not discretized) look in your case. $\endgroup$ Mar 29, 2019 at 21:19

1 Answer 1

5
$\begingroup$
 a = 1; b = 5;

Please try plotting with Region[]. These look okay to me:

 Region[RegionDifference[Disk[{0, 0}, b], Disk[{0, 0}, a]]]

enter image description here

 Region[Annulus[{0, 0}, {a, b}]]

enter image description here

Here is a decent plot, with RegionPlot:

 RegionPlot[x^2 + y^2 > 1 && x^2 + y^2 < 25, {x, -6, 6}, {y, -6, 6}]

enter image description here

Here it is (again) with Graphics[]:

 Graphics[{LightBlue, Annulus[{0, 0}, {a, b}]}]

enter image description here

$\endgroup$
2
  • $\begingroup$ Hmmm, that worked, but why is RegionPlot so funky? $\endgroup$
    – ions me
    Mar 29, 2019 at 20:13
  • 1
    $\begingroup$ I think MarcoB mostly answers this below your question. So we can then ask: Why does RegionPlot use one algorithm, and Region another? RegionPlot seems to like functions as inputs, and also likes to have the $x$ and $y$ ranges speciifed ... $\endgroup$
    – mjw
    Mar 29, 2019 at 20:17

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.