Mathematical Principles for Scientific Computing and Visualization
http : // www.farinhansford.com/books/scv
by Gerald Farin and Dianne Hansford

This notebook demonstrates the Lorenz attractor, a system of three ODEs.

Figures 9.10 was created with this notebook.

See Chapter 9 : Computing Dynamic Processes for details.

Updated July 2008

(* Set the output folder *)
SetDirectory[ToFileName[Extract["FileName"/.NotebookInformation[EvaluationNotebook[]],{1},FrontEnd`FileName]]];

(* SOlve the three ODEs *)
(* The left of Figure 9.10 is generated with y=1 and  the right of the Figure is generated with y=1.00001 *)

NDSolve[{x'[t]==-10 (x[t]-y[t]),
y'[t]==-x[t] z[t]+28 x[t]-y[t],
z'[t]==x[t] y[t]-2.6666666667z[t],
x[0]==z[0]==0,
y[0]==1.00001},{x,y,z},
{t,0,100},MaxSteps->Infinity]


(* Plot the three functions x(t), Y(t), z(t) *)

pic=ParametricPlot3D[Evaluate[{x[t],y[t],z[t]}/.%],{t,0,60},PlotPoints->10000, Ticks->None]

(* Create a postscript plot *)
(* Export["Lorenz.eps",pic] *)