2
$\begingroup$

I hope this helps at least one person who is in a similar situation. I am trying to create a region (suitable for solving a PDE on) which can be described through a Fourier cosine series in polar coordinates. That is

fourier

I used to be able to do this easily through the ParametricRegion command. Now that I am using Mathematica 11, however, I am having difficulty: when I use ParametricRegion with two parameters to create a region in polar coordinates, the region does not display correctly using the RegionPlot command e.g. try the following commands verbatim from the ParametricRegion documentation:

\[ScriptCapitalR] = ParametricRegion[{{s, (1 + t) s^2 - t}, -1 <= s <= 1 && 0 <= t <= 1}, {s, t}]; RegionPlot[\[ScriptCapitalR]] 

This code produces the following image:

badregion

This is not correct. I assume this is some kind of bug in Mathematica 11, because it worked fine in version 10. Does anyone know another/better way to create such a 2D region in polar coordinates; unfortunately, it is important for my application that I not use a polygonal approximation (the region must be smooth).

Thanks for any help!

$\endgroup$
3
  • $\begingroup$ Does DiscretizeRegion[reg] work for you? Or Needs["NDSolve`FEM`"]; emesh = ToElementMesh[reg]; MeshRegion[emesh]? (FWIW, the mesh regions actually make a polygonal approximation to the region.) $\endgroup$ Commented Dec 8, 2016 at 3:49
  • $\begingroup$ Michael, Thanks for the help! in fact, the meshing works just fine (with occasional errors for some parameters), however, when I try to plot the result of solving the PDE (call it usol) Plot3D[usol[x,y],{x,y} [Element] [CapitalOmega]] it plots over a distorted region (like the one shown above). I suppose I might have to live with it for the time being. Just wondering if anyone has noticed this peculiarity yet. $\endgroup$ Commented Dec 8, 2016 at 3:56
  • $\begingroup$ Perhaps ElementMeshPlot3D might help. There are three answers in all using this undocumented function on site if you search for them. $\endgroup$ Commented Dec 8, 2016 at 4:00

1 Answer 1

2
$\begingroup$

I can confirm that the OP code works in MM 10.4. Not sure if this is a bug, but as a workaround here is the conversion to ImplicitRegion that works in 11.0.1:

r = ImplicitRegion[ RegionMember[ ParametricRegion[{{s, (1 + t) s^2 - t}, -1 <= s <= 1 && 0 <= t <= 1}, {s, t}], {s, t}], {s, t}]; RegionPlot[r] 

Mathematica graphics

$\endgroup$
1
  • $\begingroup$ It works! Thank you for your help. $\endgroup$ Commented Dec 8, 2016 at 14:58

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.