Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: Strange size changes in Manipulate with GeometricTransformation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg92214] Re: Strange size changes in Manipulate with GeometricTransformation
  • From: Albert Retey <awnl at gmx-topmail.de>
  • Date: Tue, 23 Sep 2008 07:32:21 -0400 (EDT)
  • References: <gb7o8i$nc9$1@smc.vnet.net>

Nazdrovje wrote:
> Hi group,
> 
> I was playing with Manipulate and GeometricTransformation and found a
> strange difference in behaviour when manipulating the orientation of a
> circle containing a line depending on how it was drawn. Below, I
> provide two ways of drawing this configuration. The first one behaves
> as expected, but moving the slider in the second example results in
> unexpected size changes.
> 
> I suppose it must have something to do with bounding boxes of the
> building blocks, but I don't quite get it. I also feel the behaviour
> of the second one is actually wrong. What do you folks think?
> 
> Cheers -- Nazdrovje
> 
> This one rotates as expected:
> 
> Manipulate[
>  Graphics[
>   GeometricTransformation[
>    {
>     Circle[],
>     Line[{{-1, 0}, {1, 0}}]
>     }, RotationTransform[x =B0]
>    ]
>   ], {x, -180, 180}
>  ]
> 
> This one behaves erratical:
> 
> Manipulate[
>  Graphics[
>   GeometricTransformation[
>    {
>     EdgeForm[Black],
>     FaceForm[],
>     Disk[{0, 0}, 1, {\[Pi], 2 \[Pi]}],
>     Disk[{0, 0}, 1, {0, \[Pi]}]
>     }, RotationTransform[x =B0]
>    ]
>   ], {x, -180, 180}
>  ]
> 
Looks like a minor bug to me, obviously the code that determines
PlotRange->All (which I think is the default) does not work correctly
when choosing a segment or arc with a third argument for Disk and
Circle. As a workaround you could set the PlotRange explicitly, e.g.:

Manipulate[
 Graphics[{GeometricTransformation[{EdgeForm[Black], FaceForm[],
     Disk[{0, 0}, 1, {\[Pi], 2 \[Pi]}], Disk[{0, 0}, 1, {0, \[Pi]}]},
    RotationTransform[(\[Pi] x)/180]]}, PlotRange -> 1.1], {x, -180,
  180}]

(I did choose 1.1 to make sure no lines are cut...)

hth,

albert


  • Prev by Date: Finding Nash Equilibrium in a 2 person game with continuous action space
  • Next by Date: Re: Strange size changes in Manipulate with GeometricTransformation
  • Previous by thread: Re: Strange size changes in Manipulate with GeometricTransformation
  • Next by thread: Re: Strange size changes in Manipulate with GeometricTransformation