0
$\begingroup$

I'm trying to visualize how a transformation changes the support of a pdf. My problem is as follows:

Let X and Y be random variables with a joint pdf defined on the support 0 <= X <= Y <= 1 and consider the transformation U = X/Y, V = Y

The original support:

Rxy = ImplicitRegion[0 <= x <= y <= 1, {x, y}];
RegionPlot[Rxy, Mesh -> 15]

Ruxy

The transformed support looks like a unit square:

Ruv = TransformedRegion[Rxy, {Indexed[#, 1]/Indexed[#, 2],Indexed[#, 2]} &];
RegionPlot[Ruv, Mesh -> 15]

Ruv

Would anyone have suggestions on how to animate this transformation? I am aware of the Animate command. I also found this article on how to animate a Conformal mapping, but was unable to apply its methods to my region.

For further clarification, I'm looking for something like this:

transformation animation

I want to visualize how the first region "morphs" into the second given the above transformation.

$\endgroup$
  • $\begingroup$ What would animate? $\endgroup$ – wolfies Nov 15 '17 at 14:56
  • $\begingroup$ Hi wolfies, It would animate exactly how the first region gets morphed into the second. For example: media.giphy.com/media/xT1R9RaJf4082UJyzC/giphy.gif $\endgroup$ – TensorFlow Nov 16 '17 at 1:18
  • $\begingroup$ Would you mind mentioning where you got the animation from? $\endgroup$ – J. M. will be back soon Nov 16 '17 at 1:27
  • $\begingroup$ Please add the code to your post so that it can be copied and pasted. $\endgroup$ – Edmund Nov 16 '17 at 2:19
  • $\begingroup$ I don't see that there is any partial 'morphing' of the one into the other, in any mathematical sense. Perhaps what you are seeking should be done in an animation package or Photoshop etc --- I don't see the maths of it though. $\endgroup$ – wolfies Nov 16 '17 at 3:03
0
$\begingroup$

I had to parameterize the problem a bit differently, but I was able to create the animation I wanted:

ParametricPlot[{t, m*t}, {m, 1, 100}, {t, 0, 1/m}, PlotRange -> {{0, 1}, {0, 1}}]

Ideally I would let m -> Infinity but m = 100 works well enough. This essentially generates a region consisting of lines with slope m > 1.

Rxy

Thus X = t and Y = m*t. When we make the transformation from U to V we get U = X/Y = t/(m*t) = 1/m and V = Y = m*t:

u[t_, m_] := 1/m;
v[t_, m_] := m*t;
ParametricPlot[{u[t, m], v[t, m]}, {m, 1, 100}, {t, 0, 1/m},PlotRange -> {{0, 1}, {0, 1}}]

Ruv

Finally, the transformation can be animated with:

Animate[ParametricPlot[{t (1 - eps) + eps*u[t, m], m*t (1 - eps) + eps*v[t, m]},
{m, 1, 100}, {t, 0, 1/m}, PlotRange -> {{0, 1}, {0, 1}},
MeshStyle -> {Red, Blue}, Mesh -> 50, MeshFunctions -> {#3 &, #2 &},
MeshShading -> {{None, Automatic}, {Automatic, None}}], {eps, 0, 1}]

animation

This shows me how the support actually gets stretched under the transformation of U and V. You can also see this from the Jacobian. It's like a Venetian blind when you only pull one string all the way down!

$\endgroup$

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.