Re: Controlling display of frames in a movie
- To: mathgroup at smc.vnet.net
- Subject: [mg73391] Re: Controlling display of frames in a movie
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Thu, 15 Feb 2007 05:00:04 -0500 (EST)
- Organization: Uni Leipzig
- References: <equnlk$ih5$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
Hi,
you must render the frames in a list and than ShowAnimation[]
or the FrontEnd[] can show the frames and you can control
the frame rate.
For example
<< Graphics`Animation`
Block[{$DisplayFunction=Identity},
frameList=Table[Plot[Sin[i*x],{x,0,2Pi}],{i,1,256}]
]
ShowAnimation[frameList];
Regards
Jens
Alain Cochard wrote:
> 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
>