MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Ploting a transformation of a set

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123396] Re: Ploting a transformation of a set
  • From: Ray Koopman <koopman at sfu.ca>
  • Date: Mon, 5 Dec 2011 05:16:45 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

Here are two static plots that should help clarify 
which points on the left map into which points on the right.
The only difference between the two plots is the definition of h.

xy = .08 Flatten[Table[{x,y}, {x,0,25},{y,0,25-x}], 1]; 
UV = Sqrt[#.{{1,.5},{.5,1}}]&;
 
With[{plotstuff = {AspectRatio -> Automatic, Frame->True},
      h = Hue[.5Plus@@#]&}, 
Show[GraphicsRow[
{Graphics[{PointSize[.03],{h@#,Point@#}&/@xy}, plotstuff],
 Graphics[{PointSize[.03],{h@#,Point@UV@#}&/@xy}, plotstuff]}], 
ImageSize -> 600]]

With[{plotstuff = {AspectRatio -> Automatic, Frame->True},
      h = Hue[(Subtract@@#+2)/4]&}, 
Show[GraphicsRow[
{Graphics[{PointSize[.03],{h@#,Point@#}&/@xy}, plotstuff],
 Graphics[{PointSize[.03],{h@#,Point@UV@#}&/@xy}, plotstuff]}], 
ImageSize -> 600]]

----- Barrie Stokes <Barrie.Stokes at newcastle.edu.au> wrote:
> Hi Ray, Hi Justin
> 
> Ray, I like your idea for displaying this transformation, but wanted
> to be sure myself which xy points were going to which uv points.
> 
> The first thing I tried was to get colour into the picture,
> but the following is deceptive:
> 
> xy = .2 Flatten[ 
>     Table[ {x, y}, {x, 0, 10, 0.2}, {y, 0, 10 - x, 0.2} ], 1 ];
> uv = Sqrt[ xy.{{1, .5}, {.5, 1}} ];
> With[ {plotstuff = {Joined -> True, AspectRatio -> Automatic, 
>     Frame -> True, Axes -> None,  Prolog -> PointSize[ .02 ]}},
>  Show[ GraphicsRow[ {ListPlot[ xy, plotstuff, 
>      ColorFunction -> "Rainbow" ], 
>     ListPlot[ uv, plotstuff, ColorFunction -> "Rainbow" ]} ],
>        ImageSize -> 600 ] ]
> 
>  as I found when I tried
> 
> Manipulate[ 
>  (xy = .2 Flatten[ 
>      Table[ {x, y}, {x, 0, 10, 0.25}, {y, 0, 10 - x, 0.25} ], 1 ];
>   uv = Sqrt[ xy.{{1, .5}, {.5, 1}} ];
>   With[ {
>     plotstuff1 = {AspectRatio -> Automatic, Frame -> True, 
>       Axes -> None,
>                        
>       Prolog -> {PointSize[ .02 ], {PointSize[ .04 ], Hue[ 0 ], 
>          Point[ u ]}}},
>     plotstuff2 = {AspectRatio -> Automatic, Frame -> True, 
>       Axes -> None,                       
>       Prolog -> {PointSize[ .02 ], {PointSize[ .04 ], Hue[ 0 ], 
>          Point[ {Sqrt[
> \!\(\*SubscriptBox[\(u\), \(\(\[LeftDoubleBracket]\)\(\ \)\(1\)\(\ \)\
> \(\[RightDoubleBracket]\)\)]\) + 0.5 
> \!\(\*SubscriptBox[\(u\), \(\(\[LeftDoubleBracket]\)\(\ \)\(2\)\(\ \)\
> \(\[RightDoubleBracket]\)\)]\)], Sqrt[
> \!\(\*SubscriptBox[\(u\), \(\(\[LeftDoubleBracket]\)\(\ \)\(2\)\(\ \)\
> \(\[RightDoubleBracket]\)\)]\) + 0.5 
> \!\(\*SubscriptBox[\(u\), \(\(\[LeftDoubleBracket]\)\(\ \)\(1\)\(\ \)\
> \(\[RightDoubleBracket]\)\)]\)]} ]}}}},
>    Show[ GraphicsRow[ {ListPlot[ xy, plotstuff1 ], 
>       ListPlot[ uv, plotstuff2 ]} ],
>          ImageSize -> 600 ] ]),
>  {u, {0, 0}, {2, 2}}, ControlType -> Slider2D ]
> 
> As the latter shows clearly, the xy diagonal maps to the curved end
> of the "fan" region in the uv plane, but the colours (only possible
> easily with Joined->True, at a quick look) in the first plot cover
> the spectrum from red (0,2) to purple (2,0) along the xy diagonal,
> whereas the colours across the end of the "fan" are in the red to
> orange range only.
> 
> I'll bet there are other ways to show the details of such mappings, but
> I like to try to find uses for Manipulate, hence my red dot animation.
> 
> Cheers
> 
> Barrie
> 
> On 02/12/2011 at 11:20 pm, in message <201112021220.HAA01862 at smc.vnet.net>,
> Ray Koopman <koopman at sfu.ca> wrote:
>> On Nov 30, 12:19 am, Justin <justin.vala... at gmail.com> wrote:
>>> Hello,
>>> I would like to plot the following transformation of the set
>>> {x,y; x+y<2 & x>0 & y>0} => {(x+.5y)^.5, (y+.5x)^.5}.
>>> Is there any way to do this in mathematica?
>>> thanks
>> 
>> xy = .2 Flatten[Table[{x,y},{x,0,10},{y,0,10-x}],1];
>> uv = Sqrt[xy.{{1,.5},{.5,1}}];
>> With[{plotstuff = {AspectRatio->Automatic, Frame->True, Axes->None,
>>                  Prolog->PointSize[.02], DisplayFunction->Identity}},
>> Show[GraphicsArray[{ListPlot[xy,plotstuff],ListPlot[uv,plotstuff]}],
>>      ImageSize->600]]



  • Prev by Date: Re: reducing the size of a Manipulate slider control, problem when using ImageSize
  • Next by Date: Re: How to simplify ArcSin formula
  • Previous by thread: Re: Ploting a transformation of a set
  • Next by thread: Re: Ploting a transformation of a set