MathGroup Archive 2000

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

Search the Archive

Re: How to animate the process of a function Plot in only one picture.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg22631] Re: [mg22613] How to animate the process of a function Plot in only one picture.
  • From: Wagner Truppel <wtruppel at uci.edu>
  • Date: Thu, 16 Mar 2000 09:10:47 -0500 (EST)
  • References: <200003150346.WAA01849@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Mason,

you can try something like the following

Table[
   Plot[
     Sin[x], {x, 0, a},
     PlotRange -> { {0, 2Pi}, {-1, 1} } ],
   {a, 0, 2Pi, Pi/10} ]

You'll then get a sequence of plots, each extending from x = 0 to x = 
a, but with a increasing from plot to plot by Pi/10. You can then 
select them all and choose Animate Selected Graphics from the Cell 
menu to see a little movie of the function as a increases. Note, 
though, that you'll also get an error message related to the fact 
that the first plot is from x = 0 to a = 0, which Mathematica doesn't 
like. You can ignore that error message or change {a, 0, 2Pi, Pi/10} 
to something like {a, 0.0001, 2Pi, Pi/10} or turn the error message 
off.

Wagner

At 10:46 PM -0500 on 3/14/00, mason wrote:

>Dear all,
>How can I plot, for example, sin(x) and see the curve  gradually extending
>from x=0 ( curve up and down) until x=2pi?
>Thanks.
>My e-mail address : mailto:mhl at gn.tpemail.net.tw
>  Mason Lee



  • Prev by Date: Re: How to animate the process of a function Plot in only one picture.
  • Next by Date: FindMinimum
  • Previous by thread: How to animate the process of a function Plot in only one picture.
  • Next by thread: Re: How to animate the process of a function Plot in only one picture.