Message Boards Message Boards

1
|
4225 Views
|
0 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Improve results of TransformedRegion

Posted 10 years ago

Is there any setting that could be used to improve the results of TransformedRegion? For some transformations it appears to perform very poorly by default. Below is one example taken from MMA.SE (the transformation function specifically is written by Michael E2).

Transformation function:

flow = Module[{x, y}, Function[{t, a, b},
    Evaluate[
     {
       x[t, a, b], y[t, a, b]} /. First@NDSolve[{
         D[x[t, a, b], t] == y[t, a, b],
         D[y[t, a, b], t] == -Sin[x[t, a, b]],
         x[0, a, b] == a,
         y[0, a, b] == b
         },
        {x, y},
        {t, 0, 20},
        {a, -1/2, 1/2},
        {b, 1/2, 3/2}
        ]
     ], Listable]];

Region:

object = Disk[{0, 1}, 0.5];

Background:

splot = StreamPlot[{y, -Sin[x]}, {x, -4, 4}, {y, -3, 3}, StreamColorFunction -> "Rainbow"]

Somewhat correct transformations given by ParametricPlot for $t=0$ and $t=10$:

Show[
 splot,
 ParametricPlot[
  flow[t, r Cos[theta], 1 + r Sin[theta], t],
  {r, 0, 0.5},
  {theta, 0, 2 Pi}
  ]
 ]

t=0

t=10

Incomplete transformations given by TransformedRegion:

Show[
 splot,
 RegionPlot[
  TransformedRegion[
   object,
   flow[t, #, #2] &
   ]
  ]
 ]

t=0

t=10

POSTED BY: Calle E
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract