[Date Index]
[Thread Index]
[Author Index]
Animations -- delete after viewing
*To*: mathgroup at smc.vnet.net
*Subject*: [mg36898] Animations -- delete after viewing
*From*: "DrBob" <drbob at bigfoot.com>
*Date*: Tue, 1 Oct 2002 04:45:35 -0400 (EDT)
*Reply-to*: <drbob at bigfoot.com>
*Sender*: owner-wri-mathgroup at wolfram.com
>>I need a loop that goes generate next frame, delete old frame, show
new frame so that the number of frames does not become excessive.
I'm pinging the group for that. I'm just following along in this, other
than the trick of taking advantage of the half-period.
I'll be very interested in a solution myself, as I frequently run out of
memory in animations of fairly modest size -- despite having 1024MB of
RAM.
Bobby
-----Original Message-----
From: Goyder Dr HGD [mailto:H.Goyder at rmcs.cranfield.ac.uk]
To: mathgroup at smc.vnet.net
Subject: [mg36898] RE: [mg36816] Re: [mg36796] Real Time Animation
Thank you for your thought on this problem. Your method for reducing the
number of frames is ingenious and worth following.
Unfortunately, the given problem is only generic and my actual problem
involves a random motion -which I will post.
The real difficulty is that I need a large number of frames eg 500 and
thus
the paradigm of generate all frames, show all frames overloads memory.
I
need a loop that goes
generate next frame, delete old frame, show new frame
so that the number of frames does not become excessive.
Any ideas?
Hugh Goyder
-----Original Message-----
From: DrBob [mailto:drbob at bigfoot.com]
To: mathgroup at smc.vnet.net
Subject: [mg36898] RE: [mg36816] Re: [mg36796] Real Time Animation
That's nice because it avoids watching the frames being slowly created,
and the group doesn't always collapse as it should, the way I've been
doing it.
However, a couple of small changes give a smoother animation with 64
frames rather than 151, while GENERATING only 33 frames.
Block[{$DisplayFunction = Identity, half, graphs, step = Pi/32}, half =
Table[GraphicCell[Plot[Sin[t]*Sin[x], {x, 0, Pi}, PlotRange -> {{0,
Pi}, {-1, 1}}, ImageSize -> 400]], {t, -Pi/2, Pi/2 - step, step}];
graphs = Rest@Join[half, Rest@Reverse@half];
NotebookWrite[EvaluationNotebook[], Cell[CellGroupData[graphs,
Closed]]];
SelectionMove[EvaluationNotebook[], All, GeneratedCell];
FrontEndExecute[{FrontEndToken[EvaluationNotebook[],
"SelectionAnimate"]}]]
Bobby
-----Original Message-----
From: Omega Consulting [mailto:omega_consulting at yahoo.com]
To: mathgroup at smc.vnet.net
Subject: [mg36898] [mg36816] Re: [mg36796] Real Time Animation
At 03:56 AM 9/26/2002, Goyder Dr HGD wrote:
>In a presentation I wish to use Plot to generate a sequence of frames
and
>then animate them. The problem is that the audience sees the animation
>twice. Once when the frames are being generated and then again after I
have
>closed the group and double clicked on the top graphic. However, the
first
>showing during generation is enough (but uncontrolled).
>
>Hugh Goyder
This creates a graphics cell from a graphics expression.
GraphicCell[graphics_] :=
Cell[GraphicsData["PostScript", DisplayString[graphics]],"Graphics"]
This writes a closed cellgroup of graphics cells and then animates the
cellgroup.
Block[{$DisplayFunction=Identity, graphs},
graphs =
Table[GraphicCell[
Plot[Sin[t]*Sin[x], {x, 0, Pi}, PlotRange -> {{0, Pi}, {-1,
1}},
ImageSize -> 400]], {t,0,15,.1}];
NotebookWrite[EvaluationNotebook[],Cell[CellGroupData[graphs,Closed]]];
SelectionMove[EvaluationNotebook[], All, GeneratedCell];
FrontEndExecute[{FrontEndToken[EvaluationNotebook[],
"SelectionAnimate"]}]
]
--------------------------------------------------------------
Omega Consulting
"The final answer to your Mathematica needs"
Spend less time searching and more time finding.
http://www.wz.com/internet/Mathematica.html
Prev by Date:
**RE: Real Time Animation**
Next by Date:
** Re: Accuracy and Precision**
Previous by thread:
**Re: RE: Real Time Animation**
Next by thread:
**Re: Request for Mathematica Programming help.**
| |