MathGroup Archive 2007

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

Search the Archive

Controlling display of frames in a movie

  • To: mathgroup at smc.vnet.net
  • Subject: [mg73361] Controlling display of frames in a movie
  • From: Alain Cochard <alain at geophysik.uni-muenchen.de>
  • Date: Wed, 14 Feb 2007 05:16:03 -0500 (EST)
  • Reply-to: alain at geophysik.uni-muenchen.de

Hello.  I'm trying to generate a kind of animation for which I control
the display of the next frame.  In other words I'm trying to find the
Mathematica equivalent to the following script:

   x=[1 2 3] ;
   for n=1:4
     f = x.^n ; 
     plot(x,f)
     pause
   end

'x' is the vector {1,2,3}; 'f' is another vector of same length (here
obtained from x).  'plot(x,f)' simply plots f as a function of x, and
then the 'pause' statement causes the loop to stop and wait for the
user to strike any key before continuing, hence before plotting the
next curve.

The natural way would seem to be using ShowAnimation, but I didn't
find a way to control the occurrence of the next frame.  

Unless I'm missing something, using the basic (List)Plot command does
not seem to be appropriate in view of the time it takes for the window
to pop up --at least in the text based environment-- especially for
use on a remote computer.

Besides, I still wouldn't know how to close a window and initiate the
next.

Any hint?
Thanks in advance,
Alain


  • Prev by Date: Re: conditional plotstyles in ListPlot
  • Next by Date: Re: row,column question
  • Previous by thread: Re: Coaxing N[] to work
  • Next by thread: Re: Controlling display of frames in a movie