Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

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

Search the Archive

Re: Poincare sections

  • To: mathgroup at smc.vnet.net
  • Subject: [mg37305] Re: [mg37276] Poincare sections
  • From: Selwyn Hollis <selwynh at earthlink.net>
  • Date: Tue, 22 Oct 2002 04:47:59 -0400 (EDT)
  • References: <200210210630.CAA12321@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Not entirely sure what you're asking for, but here's a simple routine 
that plots a Poincare section for a pair of ODEs with vector field (f,g):

PoincareSection[{f_,g_}, {t_,t0_,tmax_,dt_}, {x_,x0_}, {y_,y0_}] :=
   Module[{xsoln, ysoln},
    {xsoln, ysoln} = {x, y} /. First@
    NDSolve[{x'[t] == (f /. {x -> x[t], y -> y[t]}),
             y'[t] ==(g /. {x -> x[t], y -> y[t]}),
             x[0]==x0, y[0]==y0}, {x, y},
             {t, t0, tmax}, MaxSteps -> Infinity];
    ListPlot[Table[{xsoln[t], ysoln[t]}, {t, t0, tmax, dt}]]]

And this is the classic example with Duffing's equation:

PoincareSection[{y, x - x^3 - 0.2y + 0.3Cos[t]},{t,0,3000,2Pi},
    {x, -1}, {y, 1}]

---
Selwyn Hollis



ckkm wrote:
> Do you have some package that helps me vizualize subj. when i start from
> motion equations or even Hamiltonian? Thanks.
> __________________________________________________________________ ckkm
> ICQ#: 54326471 Current ICQ status: +
> __________________________________________________________________
> 
> 
> 
> 
> 
> 




  • Prev by Date: RE: PatternMatching with Dt[]
  • Next by Date: Re: Problem with PDF generation from Mathematica
  • Previous by thread: Poincare sections
  • Next by thread: Re: Poincare sections