(*Adapted by Rafael Luís: rafaelluis@netmadeira.com
  2016-09-11: updated for Mathematica v.10 by Ross Moore  *)

(*Lorenz Attractor for (x,y,z)=(σ(y-x),rx-y-xz,xy-bz)*)

Clear[σ,r,b,x,y,z]
σ=10;
r=28;
b=8/3;
Timing[soln=NDSolve[{
x'[t]==-σ (x[t]-y[t]),
y'[t]==-x[t]z[t]+r x[t]-y[t],
z'[t]==x[t] y[t]-b z[t],
x[0]==z[0]==0,
y[0]==1
},{x,y,z},{t,0,30},MaxSteps->5000]]

plot=ParametricPlot3D[Evaluate[{x[t],y[t],z[t]}/.(soln//Last)],{t,0,30},PlotPoints->10000]