1
$\begingroup$

When I try to plot this simple parametric region:

ParametricRegion[{x, Sin[z + t] + Sin[t - z]}, {{x, 0, 1}, {z, 0, 1}, {t, 0, 1}}];
RegionPlot[%]

I get errors telling me the "parametric region cannot be automatically discretized" and "is not a valid region to plot".

How can I plot this parametric region ?

$\endgroup$
  • $\begingroup$ Is that an $x$ or a $z$? If you change $x$ to $z$, you get output. Also, please add a ] at the end of the first line. $\endgroup$ – mjw Mar 15 at 17:01
  • $\begingroup$ @mjw Thanks. Actually, it is an x not a z. $\endgroup$ – Pon Mar 15 at 17:23
  • 1
    $\begingroup$ Please describe in mathematical terms the region you want to plot. Is it a 2D or 3D region? $\endgroup$ – mjw Mar 15 at 17:40
  • $\begingroup$ It is a 2D region defined as the set of points of coordinates ( x , sin(t+z)+sin(t-z) ) when x, t and z run over the interval [0,1] $\endgroup$ – Pon Mar 15 at 23:21
  • $\begingroup$ If it is a 2D region, what are the abscissa and ordinate variables? It could only be two of these three, right?: $\{t,x,z\}$ $\endgroup$ – mjw Mar 17 at 2:30
1
$\begingroup$

Let's not worry about $x$ for now. For a few values of $z$, we plot the curve representing $y$:

 p = 3; Plot[Evaluate@Table[Sin[z - t] - Sin[z + t], {z, Range[0,p]/p}], {t, 0, 1}]

enter image description here

For various values of $z$, we can now plot the regions in $xy$-space.

 p = 3; 
 ParametricPlot[
   Evaluate@
     Table[{x, Sin[z - t] - Sin[z + t]}, {z, Range[0,p]/p}], {x, 0,1}, {t, 0, 1}]

enter image description here

The union of all of the regions is the region with $z=0$:

 ParametricPlot[{x, -2 Sin[t]}, {x, 0, 1}, {t, 0, 1}]

enter image description here

This is a rectangle of width 1 and height $2 \sin 1 \approx 1.68294$.

$\endgroup$
  • $\begingroup$ Thanks for your answer. I understand your steps but this is not exactly what RegionPlot[ParametricRegion[{x, Sin[z + t] + Sin[t - z]}, {{x, 0, 1}, {z, 0, 1}, {t, 0, 1}}]] is supposed to do in one shot ? $\endgroup$ – Pon Apr 18 at 15:14
  • $\begingroup$ What do you think the resulting plot will look like, assuming we can use RegionPlot[ParametricPlot[]]? $\endgroup$ – mjw Apr 18 at 16:00
  • $\begingroup$ Not with ParametricPlot[] but with ParametricRegion[] . As far as I know, since Mathematica 10 we can define a region using ParametricRegion[] and then plot it with RegionPlot[]. For me, RegionPlot[ParametricRegion[]] is supposed to do the job, and I should get the same plot as you. For instance, if I try RegionPlot[ParametricRegion[{x, Sin[z + t]}, {{x, 0, 1}, {z, 0, 1}, {t, 0, 1}}]], it works perfectly in one shot. What I do not understand is why when I add a second term for the ordinate, namely Sin[t-z], it does not work anymore. $\endgroup$ – Pon Apr 19 at 15:41
  • $\begingroup$ You are right. That breaks it. ParametricRegion[] can handle it, but then when it is processed by RegionPlot[] it cannot handle it. By the way: $\sin(z-t)-\sin(z+t)=-2\cos z \sin t.$ It seems that the $z$ parameterization is redundant. I don't know if this has anything to do with Mathematica's inability to plot the sum (or product). $\endgroup$ – mjw Apr 19 at 17:06

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.