MathGroup Archive 2004

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

Search the Archive

RE: Smooth animation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg47186] RE: [mg47165] Smooth animation
  • From: "tgarza01 at prodigy.net.mx" <tgarza01 at prodigy.net.mx>
  • Date: Mon, 29 Mar 2004 04:22:33 -0500 (EST)
  • Reply-to: tgarza01 at prodigy.net.mx
  • Sender: owner-wri-mathgroup at wolfram.com

Once you have executed your code, select all the plots (click on the blue
cell indicator on the right). Then Cell||Cell Grouping||Open/Close Group.
Then Ctrl-Y (Animate Selected Graphics).

Tomas Garza
Mexico City

Original Message:
-----------------
From: Erich Neuwirth erich.neuwirth at univie.ac.at
To: mathgroup at smc.vnet.net
Subject: [mg47186] [mg47165] Smooth animation


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?


--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .



  • Prev by Date: Re: Assumption -> quadratic multivariate function
  • Next by Date: Re: Yet another simple question.
  • Previous by thread: Re: Smooth animation
  • Next by thread: Limit Question