Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

RE: Smooth animation

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

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
To: mathgroup at
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 .

  • 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