MathGroup Archive 2007

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

Search the Archive

RE: Graphics - Manipulate Question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg78897] RE: [mg78863] Graphics - Manipulate Question
  • From: "David Park" <djmpark at comcast.net>
  • Date: Thu, 12 Jul 2007 05:18:55 -0400 (EDT)
  • References: <200707111016.GAA06864@smc.vnet.net> <13198090.1184161645831.JavaMail.root@m41>

Thanks for that Selwyn. It does what I was looking for.

This raises a couple more questions. Here is a slightly modified version 
of your expression. I added PlotRange -> All just to make it explicit.

Manipulate[
 Graphics[
  {{Opacity[0.1], Circle[{0, 0}, Scaled[(Sqrt[2] + 1)/2 // N]]},
   Rotate[Circle[Scaled[{1, 0}]], \[Theta], {0, 0}]},
  Axes -> True,
  PlotRange -> All,
  PlotRangeClipping -> False,
  ImageSize -> 300],
 {\[Theta], 0, Pi}]

Question 1: Why do I have to use //N in the Scaled Circle expression? It 
seems like a bug in Circle. Numeric expressions are accepted in other 
uses of Scaled.

Question 2: What determines the extent of the Axes? I think the answer 
to this is that no graphics objects with Scaled coordinates, even a 
rotated one, will affect the axes Range. But they do affect the 
PlotRange. In this plot there is no unscaled object so the axes Range 
goes to the Default value.

Graphics[
{},
Axes->True]

Here are a bunch of Scaled objects. None of them alter the default Axes 
range.

Graphics[
{{Opacity[0.1],Circle[{0,0},Scaled[1]]},
Circle[Scaled[{1,0}]],
Opacity[0.3,Pink],Rectangle[Scaled[{0,0}],Scaled[{2,2}]]},
Axes->True,
PlotRange->All,
PlotRangeClipping->False,
ImageSize->300]

But if we put in even one unscaled object, then it will override the 
default axes Range.

Manipulate[
Graphics[
{{Opacity[0.1],Circle[{0,0},Scaled[3]],
Rectangle[{0,0},{2,2}]},
Rotate[Circle[Scaled[{1,0}]],\[Theta],{0,0}]},
Axes->True,
PlotRange->Automatic,
PlotRangeClipping->False,
ImageSize->300],
{\[Theta],0,Pi}]

And if we explicitly specify the PlotRange then that gives the axes 
Range and the overall plot Range is restricted to it.

Manipulate[
Graphics[
{{Opacity[0.1],Circle[{0,0},Scaled[(Sqrt[2]+1)/2//N]]},Rotate[Circle[Scaled[{1,0}]],\[Theta],{0,0}]},
Axes->True,
PlotRange->{{-1,1},{-1,1}},
PlotRangeClipping->False,
ImageSize->300],
{\[Theta],0,Pi}]

This is all very subtle and I would say there is a missing element of 
control - namely the relation between the axis Range and the plot Range.


David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark



From: Selwyn Hollis [mailto:sh2.7183 at earthlink.net]

David,

One can fake it like this:

Manipulate[
  Graphics[{{Opacity[0], Circle[{0, 0}, Scaled[1.25]]},
    Rotate[Circle[Scaled[{1, 0}]], =CE=B8, {0, 0}]}, Axes -> True,
   PlotRangeClipping -> False, ImageSize -> 600], {=CE=B8, 0,Pi}]


- Selwyn



On Jul 11, 2007, at 6:16 AM, David Park wrote:

> Here is an example from the Rotate help notebook:
>
> Graphics[Rotate[Circle[Scaled[{1,0}]],Pi,{0,0}],Axes->True]
>
> It displays the complete circle but the axes only extend to +/- 1. The
> purpose of the example is to illustrate the effect of Rotate on an 
> object
> with scaled coordinates. Suppose we want to see the rotation as a 
> continuous
> action. Here is an attempt using Manipulate:
>
> Manipulate[
>  Graphics[
>   Rotate[Circle[Scaled[{1, 0}]], \[Theta], {0, 0}],
>   Axes -> True,
>   PlotRange -> 1,
>   PlotRangeClipping -> False,
>   PlotRegion -> {{.3, .7}, {.3, .7}},
>   ImageSize -> 300],
>  {\[Theta], 0, \[Pi]}]
>
> How would one obtain a display that showed the full circle as the 
> initial
> example did?
>
> --
> David Park
> djmpark at comcast.net
> http://home.comcast.net/~djmpark/
>
>
>




  • Prev by Date: Re: ideas please!
  • Next by Date: Graphics, text and turning lines into tubes?
  • Previous by thread: Graphics - Manipulate Question
  • Next by thread: Re: Graphics - Manipulate Question