MathGroup Archive 2000

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

Search the Archive

animation on fixed background

  • To: mathgroup at smc.vnet.net
  • Subject: [mg23399] animation on fixed background
  • From: Wijnand Schepens <Wijnand.Schepens at rug.ac.be>
  • Date: Sat, 6 May 2000 02:26:43 -0400 (EDT)
  • Organization: RUG
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

I want to create an animation with a fixed background, i.e. each frame
consists of a Show[back, fore[p] ]
where back and fore are graphics objects and fore depends on some
parameter p
(e.g. a particle moving on a fixed curve)

e.g.
In[5]:=
  back = Plot[Sin[x], {x, 0, 6}]

In[6]:=
  fore[p_] := Plot[Sin[x + p], {x, 0, 6}, DisplayFunction -> Identity]

In[13]:=
  frame[p_] := Show[back, fore[p], DisplayFunction -> $DisplayFunction]

In[15]:=
  Table[frame[p], {p, 0, 1, 0.1}];

Then I close the cell-group and press crtl-Y to start the simulation
(Win95, M 4.0)

Questions:
1. is the ugly DisplayFunction construct the only way to avoid the
rendering of intermediate plots?

2. Is there a way to automate the selection of a cell-group, the closing
of the cell-group and the starting of the animation from within a
notebook?

3. The Windows interace provides you with buttons to influence the
animations: change direction, regulate speed etc. Is there a way to
prevent the animation from restarting again each time afresh? I want to
see all the frames only once.

4. Is there a way to avoid the showing of 'back' every time? The fact
that every frame contains the (same) background graphics means that this
takes a lot of memory. Is there a way to reduce this memory-overhead?

Can anyone help me?

Wijnand Schepens
University of Ghent, Belgium



  • Prev by Date: Database in Module ?
  • Next by Date: Re: Re: plot discrete spectrum
  • Previous by thread: Database in Module ?
  • Next by thread: win 2000 and bracket-maching speed