RE: Movies
- To: mathgroup at smc.vnet.net
- Subject: [mg42531] RE: [mg42501] Movies
- From: "David Park" <djmp at earthlink.net>
- Date: Sat, 12 Jul 2003 20:53:10 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Steffen,
Here is an example:
Needs["Graphics`Animation`"]
f[x_, y_] := (100 - x^2)y/100
frame[y_] := Plot[f[x, y], {x, -10, 10},
Epilog -> {Text[SequenceForm["y = ", y], Scaled[{0.05, 0.9}], {-1, 0}]},
Frame -> True,
PlotRange -> {{-10.02, 10.02}, {-1, 110}},
ImageSize -> 400]
Animate[frame[y], {y, 0, 100, 2}]
SelectionMove[EvaluationNotebook[], All, GeneratedCell]
FrontEndTokenExecute["OpenCloseGroup"]; Pause[0.01];
FrontEndExecute[{FrontEnd`SelectionAnimate[200, AnimationDisplayTime -> 0.1,
AnimationDirection -> ForwardBackward]}]
In doing an animation you need to specify the same PlotRange for each frame.
Otherwise, Mathematica uses PlotRange -> Automatic, and the y range may vary
from frame to frame giving a jumpy animation.
David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/
From: Steffen [mailto:nnnx at gmx.de]
To: mathgroup at smc.vnet.net
Hi all,
this is the first time i participate this Newsgroup. Therefore I don´t know
whether or not this task has been posted before. I looked through the posts
but did not find anything.
So here is my problem: I would like to build up a little movie showing me
the behaviour of a function f(x,y). Let us assume to plot the function from
{x,-10,10} holding the parameter y fixed (lets say y = 1). This results in a
2D plot. Now I want to vary y from 1 to 100. This means to plot f(x,1) to
f(x,100) in a row. Of course one can use "MoviePlot" to generate 100 plots
of f(x,1) to f(x,100) in a row. But how can I make a movie in one frame
where I only have to click on it or something else.
If there are any hints or suggestions, I would be very thankful.
By all
Steffen