MathGroup Archive 2000

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

Search the Archive

animation on fixed background

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


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)

  back = Plot[Sin[x], {x, 0, 6}]

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

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

  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)

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

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