MathGroup Archive 2004

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

Search the Archive

Smooth animation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg47165] Smooth animation
  • From: Erich Neuwirth <erich.neuwirth at univie.ac.at>
  • Date: Sun, 28 Mar 2004 00:07:55 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

I am trying to do a nice animation.
Here it is

<< Graphics`Graphics`

Env[x_] := (Cos[Min[Abs[x], 1]*Pi]/2 + 1/2)

ShepFrame[order_, frac_] :=
   Module[{g1, g2},
     g1 = Plot[Env[t], {t, -1.1, 1.1}, DisplayFunction -> Identity];
     g2 = GeneralizedBarChart[
         Table[{(frac + i)/order, Env[(frac + i)/order], 0.025},
	{i, -order, order - 1}],
         DisplayFunction -> Identity];
     Show[g1, g2, DisplayFunction -> $DisplayFunction,
	AspectRatio -> 0.3,
       	ImageSize -> {500, 200}]]

Do[ShepFrame[3, t/100], {t, 0, 100}]


It works, but the animation is jumpy, the bare change their widths
wich they should not. Is there an easy way of making the animation smoother?


  • Prev by Date: RE: Options in Plot
  • Next by Date: Re: solving nonlinear equation with mathematica !!
  • Previous by thread: Help needed (non linear equation )
  • Next by thread: Re: Smooth animation