MathGroup Archive 2009

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

Search the Archive

Re: Manipulate suggestions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg101312] Re: [mg101282] Manipulate suggestions
  • From: "David Park" <djmpark at comcast.net>
  • Date: Wed, 1 Jul 2009 06:32:59 -0400 (EDT)
  • References: <4321831.1246360824051.JavaMail.root@n11>

Tony,

I think you are correct that the StepLeft and StepRight Buttons should FIRST
put the animation into a pause state.

There is another problem with AppearanceElements in Animator. That is that
the elements always appear in a fixed order - no matter what order they are
specified in the list of elements. It would be really nice if the user could
control the order.

However, it is always possible to make a custom dynamic presentation, and
much more fun because you don't have to waste your time trying to figure out
how you can screw around Manipulate to your liking. One of the principles to
remember is that we can have multiple controls that control the SAME
variable. So we just write multiple Animators, each with their own
AppearanceElements, and an InputField, all controlling n.

DynamicModule[
 {n = 2},
 Panel[
  Column[
   {Row[{Animator[Dynamic[n], {1, 5}, AnimationRunning -> False, 
       AnimationRate -> 4/5, Appearance -> Small, 
       AppearanceElements -> "PlayPauseButton"],
      Animator[Dynamic[n], {1, 5}, AnimationRunning -> False, 
       AnimationRate -> 4/5, Appearance -> Tiny, 
       AppearanceElements -> "ProgressSlider", ImageSize -> Tiny],
      Animator[Dynamic[n], {1, 5}, AnimationRunning -> False, 
       AnimationRate -> 4/5, Appearance -> Small, 
       AppearanceElements -> {"StepLeftButton", "StepRightButton"}],
      Spacer[5], "Enter n:", Spacer[5],
      InputField[Dynamic[n], FieldSize -> {4, 1}]
      }] (* Animator Row *),
    Dynamic@Plot[x^n, {x, 0, 1}, PlotRange -> {0, 1}, ImageSize -> 300]
    }](* Column *),
  Style["Custom Dynamic Presentation for AES", 16],
  BaseStyle -> {FontSize -> 16}]
 ]


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


From: AES [mailto:siegman at stanford.edu] 

Now that I've finally gotten around to learning and using Manipulate 
(admittedly late to the table), I have to agree that it truly does 
deserve the Steve Jobs/Apple appellation, "Insanely great".  But, a few 
minor gripes/suggestions:

1)  Executing

      Manipulate[ Plot[x^n, {x, 0, 1}], {{n,2}, 1, 5, Animator}]

without the "Animator" and then clicking the inverted "+" icon gives me 
the icon control buttons and the numeric value/data entry box (which is 
very valuable).  Adding the "Animator" as above auto-opens the icon 
control buttons, but not the numeric field.  

Why not?  (That is, is there a good and necessaru reason it doesn't)  

Is there a way to build an automated "Auto-click the inverted + button  
for me" into the Manipulate command?

2)  Does anyone else agree with me that "-" and "+" single-step buttons 
should be side by side (just like the Slow/Fast vertical double arrows), 
with the Start/Stop button either at the very left end, or over just to 
the left of the Slow/Fast arrows)?  Trivial point, perhaps, but seems 
like a more natural ordering.

3)  And would anyone else agree that the default action if you click the 
single-step buttons while an animation is running should be to _stop_ 
the animation, and wait for further single steps (and let you click the 
Start arrow when you're ready to re-start).

Seems to me this is the way many if not most other video and movie apps 
work -- and the natural way that a user would want it to work.  
(Otherwise, what would be the point of clicking the single step buttons 
during a running animation?)

4)  Any simple way -- repeat, simple! -- to link the single step buttons 
to Left and Right (or Up/Down) Arrow keys on your keyboard.  (Should 
that maybe be the built-in default?  Doesn't nearly every keyboard have 
arrow keys?)

Anyway, despite my other continuing critiques of Mathematica, Manipulate 
is a great concept, very neatly executed, and a real credit to the 
Wolfram team.




  • Prev by Date: Re: Applying lists to FindRoot of a NIntegrate
  • Next by Date: Manipulate subtleties?
  • Previous by thread: Re: Applying lists to FindRoot of a NIntegrate
  • Next by thread: Manipulate subtleties?