MathGroup Archive 2002

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

Search the Archive

RE: Re: Ball Rolling down on Cosh[t] Path

  • To: mathgroup at smc.vnet.net
  • Subject: [mg36747] RE: [mg36738] Re: Ball Rolling down on Cosh[t] Path
  • From: "DrBob" <drbob at bigfoot.com>
  • Date: Sun, 22 Sep 2002 04:32:28 -0400 (EDT)
  • Reply-to: <drbob at bigfoot.com>
  • Sender: owner-wri-mathgroup at wolfram.com

Here's a smoother animation, taking into account the period and cutting
the step size in half (without using more frames):

Do[Show[curve, Graphics[Disk[{
    xx[t], Cosh[xx[t]]}, 0.035]], PlotRange -> {{-1.2, 1.2}, {0.9,
1.65}}, 
        AspectRatio -> Automatic, Axes -> None], {t, 0, 2.3, 0.05}]
SelectionMove[EvaluationNotebook[], All, GeneratedCell]
FrontEndTokenExecute["OpenCloseGroup"]
FrontEndTokenExecute["SelectionAnimate"]

Bobby Treat

-----Original Message-----
From: Selwyn Hollis [mailto:slhollis at earthlink.net] 
To: mathgroup at smc.vnet.net
Subject: [mg36747] [mg36738] Re: Ball Rolling down on Cosh[t] Path

Matthias,

The simplest way to get the equation of motion is to set up the 
Lagrangian. Let's assume a 1 kg mass. Then the kinetic energy is

    KE = Simplify[(1/2)*(x'[t]^2 + D[Cosh[x[t]],t]^2)]

and the potential energy is

    PE = 9.8*Cosh[x[t]]

The Lagrangian is

    L = KE - PE

and the equation of motion is

    diffeq =
    Simplify[ D[D[L, x'[t]], t] ] == Simplify[ D[L, x[t]] ]

Now solve and animate ...

    xx[t_] = x[t]/. First[
       NDSolve[{diffeq, x[0] == -1, x'[0] == 0}, x[t], {t, 0, 5}]]

    curve = Plot[Cosh[x], {x, -1, 1}]

    Do[
       Show[curve,
            Graphics[Disk[{xx[t], Cosh[xx[t]]}, 0.025]],
            PlotRange -> {{-1.2, 1.2}, {0.9, 1.65}},
            AspectRatio -> Automatic, Axes->None],
      {t, 0, 5, 0.1}]

----
Selwyn Hollis



Matthias.Bode at oppenheim.de wrote:
> Dear Colleagues,
> 
> I intend to make an animation in which 
> 
> ball A rolls down on an inclined plane from the left whilst
> 
> ball B - starting from the same height - rolls down Cosh[t]'s path
from the
> right.
> 
> x-axis is time t, y-axis is height h.
> 
> Ball A is fine; ball B - which should arrive at h=0 before A - is
beyond my
> means.
> 
> Thank you for your consideration,
> 
> Matthias Bode
> Sal. Oppenheim jr. & Cie. KGaA
> Koenigsberger Strasse 29
> D-60487 Frankfurt am Main
> GERMANY
> Tel.: +49(0)69 71 34 53 80
> Mobile: +49(0)172 6 74 95 77
> Fax: +49(0)69 71 34 95 380
> E-mail: matthias.bode at oppenheim.de
> Internet: http://www.oppenheim.de
> 
> 







  • Prev by Date: RE: List operation, LabeledListPlot, Goto Statement
  • Next by Date: RE: List operation, LabeledListPlot, Goto Statement
  • Previous by thread: Re: Ball Rolling down on Cosh[t] Path
  • Next by thread: RE: Re: Ball Rolling down on Cosh[t] Path