MathGroup Archive 2002

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

Search the Archive

Re: Re: Poincare sections


My deepest apologies, Jens. You're right---the function I gave only 
plots Poincare *time* sections. However, it *does work* for autonomous 
(2x2) systems; it just doesn't do anything interesting.

Regards
    Selwyn


Jens-Peer Kuska wrote:
> Hi,
> 
> that work only for non-autonomos systems but the original 
> message speak about Hamiltonian systems. For a
> autonomous system your function does not work at all, because
> you have to find the intersection points of the solution
> with a plane in phase space.
> 
> Regards
>   Jens
> 
> Selwyn Hollis wrote:
> 
>>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: real valued function from complex
  • Next by Date: Re: Problem with user defined functions
  • Previous by thread: Re: Poincare sections
  • Next by thread: Re: Poincare sections