# Plot the region covered by a map?

Suppose we consider two dimensional cartesian coordinates x,y and pick a parametrization

x = r Cos[phi];
y = r Sin[phi];


I would like to plot the region in x,y-plane that is covered by the range 0<r<Infinity and 0<phi<PI/3 in the new variables. Does mathematica have a function that does this?

The plot should look something like

EDIT:

I believe there is a problem in the solution of the current answer with the plot function for a hyperbolic case:

prs = {ParametricRegion[{r Sinh[phi], r Cosh[phi]}, {{r, 0, Infinity}, {phi, -Infinity, Infinity}}],
ParametricRegion[{r Cosh[phi], r Sinh[phi]}, {{r, 0, Infinity}, {phi, 0, Infinity}}],
ParametricRegion[{-r Cosh[phi], r Sinh[phi]}, {{r, 0, Infinity}, {phi, 0, Infinity}}]};


I believe the three regions should be exactly touching each other along the adjacent straight lines, while the plot does not seem to reflect that:

Show[MapIndexed[RegionPlot[#, PlotStyle -> ColorData[97][#2[[1]]]] &, prs], AspectRatio -> 1]


• does pr = ParametricRegion[{r Cos[phi], r Sin[phi]}, {{r, 0, Infinity} , {phi, 0, Pi/3}}]; Region[pr] give what you need? – kglr Nov 29 '18 at 18:35
• @kglr looks close, but it would be nice if it had axes with numbers as well. – Kagaratsch Nov 29 '18 at 18:37

Update 2:

If you examine the prs,

 prs


{ParametricRegion[{{r Sinh[phi], Cosh[phi] r}, r >= 0}, {r, phi}],
ParametricRegion[{{Cosh[phi] r, r Sinh[phi]}, r >= 0 && phi >= 0}, {r, phi}],
ParametricRegion[{{-Cosh[phi] r, r Sinh[phi]}, r >= 0 && phi >= 0}, {r, phi}]}

it doesn't contain any information on plot region bounds. Intersecting each element of prs with RegionUnion[prs] eliminates the issue:

Show[MapIndexed[RegionPlot[RegionIntersection[#, RegionUnion @@ prs],
PlotStyle -> ColorData[97][#2[[1]]]] &, prs], AspectRatio -> 1]


Alternatively, we can RegionPlot the intersection of each element of prs with, say, Rectangle[{-50, 0}, {50, 50}]:

Show[MapIndexed[RegionPlot[RegionIntersection[#, Rectangle[{-50, 0}, {50, 50}]],
PlotStyle -> ColorData[97][#2[[1]]]] &, prs], AspectRatio -> 1]


You can use ParametricRegion:

pr = ParametricRegion[{r Cos[phi], r Sin[phi]}, {{r, 0, Infinity} , {phi, 0, Pi/3}}];
RegionPlot[pr]


Update: Is there a way to glue several parametric regions together?

prs = ParametricRegion[{r Cos[phi], r Sin[phi]}, {{r, 0, Infinity}, {phi, ##}}] & @@@
{{0, Pi/3}, {2 Pi/3, Pi}};

Show[MapIndexed[RegionPlot[#, PlotStyle -> ColorData[97][#2[[1]]]] &,  prs],
PlotRange -> {-1, 1}, AspectRatio -> 1]


• Is there a way to glue several parametric regions together? Like for {phi, 0, Pi/3} and {phi,2Pi/3, Pi} for instance? – Kagaratsch Nov 29 '18 at 18:59
• @Kagaratsch, please see the update. – kglr Nov 29 '18 at 19:06
• I believe there is a problem with the plot function for a hyperbolic case: prs = {ParametricRegion[{r Sinh[phi], r Cosh[phi]}, {{r, 0, Infinity}, {phi, -Infinity, Infinity}}], ParametricRegion[{r Cosh[phi], r Sinh[phi]}, {{r, 0, Infinity}, {phi, 0, Infinity}}], ParametricRegion[{-r Cosh[phi], r Sinh[phi]}, {{r, 0, Infinity}, {phi, 0, Infinity}}]}; I believe the three regions should be exactly touching each other along the adjacent straight lines, while the plot does not seem to reflect that. – Kagaratsch Nov 29 '18 at 19:29

I have noticed before that, as mentioned by OP, region functions do seem to have numerical problems which causes them not to render regions, other than simple ones, correctly. But there is also ParametricPlot which seems to work:

Show[
ParametricPlot[
{r Sinh[phi], r Cosh[phi]},
{r, 0, 10^5}, {phi, -10^3, 10^3},
PlotStyle -> ColorData[97, 1],
PlotRange -> {{-1.5, 1.5}, {0, 2}}
],
ParametricPlot[
{r Cosh[phi], r Sinh[phi]},
{r, 0, 10^5}, {phi, -10^3, 10^3},
PlotStyle -> ColorData[97, 2],
PlotRange -> {{-1.5, 1.5}, {0, 2}}
],
ParametricPlot[
{-r Cosh[phi], r Sinh[phi]},
{r, 0, 10^5}, {phi, -10^3, 10^3},
PlotStyle -> ColorData[97, 3],
PlotRange -> {{-1.5, 1.5}, {0, 2}}
]
]


ParametricPlot[{r Cos[phi], r Sin[phi]}, {r, 0, 10}, {phi, 0, Pi/3}]


Note that this function was introduced in 1988 and ParametricRegion in 2014. This is the function that would traditionally be used for this task, whereas ParametricRegion is not just for visualizing but also for doing computations on said regions. A ParametricRegion represents an object which we can e.g. use Area on.