That's cool. Good luck on your talk.

BTW, have you tried this?
http://www.math.pitt.edu/~bard/xpp/xpp.html
I could not get it to compile from source but fortunately
is a debian package (apt-get install xppaut). The docs say it

"is a tool for solving

    * differential equations,
    * difference equations,
    * delay equations,
    * functional equations,
    * boundary value problems, and
    * stochastic equations."

So I thought you might be interested. The screenshot
section even has an animated gif
http://www.math.pitt.edu/~bard/xpp/ss/screen.html
Lorentz plot.

On Jan 29, 2008 4:38 AM, Joshua Kantor <[EMAIL PROTECTED]> wrote:
>
> I was preparing a talk on solving ODE's in sage, and the culminating
> example is pretty neat so I thought I would post it.
>
> The following code will plot a little bit of the lorenz attractor
>
> sage: def lorenz(t,y,params):
> ...      return [params[0]*(y[1]-y[0]),y[0]*(params[1]-y[2])-
> y[1],y[0]*y[1]-params[2]*y[2]]
>
> sage: def lorenz_jac(t,y,params):
> ...      return [ [-params[0],params[0],0],[(params[1]-y[2]),-1,-y[0]],
> [y[1],y[0],-params[2]],[0,0,0]]
> sage: T=ode_solver()
> sage: T.algorithm="bsimp"
> sage: T.function=lorenz
> sage: T.jacobian=lorenz_jac
> sage: T.ode_solve(y_0=[.
> 5,.5,.5],t_span=[0,155],params=[10,40.5,3],num_points=4000)
> sage: l=[T.solution[i][1] for i in range(len(T.solution))]
> sage: line3d(l,thickness=2)
>
> This is somewhat computationally intensive (takes around a minute).
>
> I thought the plot was quite neat.
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to