Remark on 3-D phase portraits

Example: The Lorenz attractor

Clear[x,y,z,d,r,b]
Tmax=40; imagesize=450;
x0=1.1;y0=1;z0=1;
d=10;r=28;b=8/3;

diffX=d (y-x);diffY=r x-y-x z;diffZ=x y-b z;
vecplot=VectorPlot3D[{diffX,diffY,diffZ},{x,-15,20},{y,-20,20},{z,0,50},AxesLabel->{x[t],y[t],z[t]},LabelStyle->20,ImageSize->imagesize,VectorPoints->10,VectorScale->{0.045,Scaled[0.3]}];
solution=NDSolve[{
x'[t]==d (y[t]-x[t]),
y'[t]==r x[t]-y[t]-x[t] z[t],
z'[t]==x[t] y[t]-b z[t],
x[0]==x0,y[0]==y0,z[0]==z0},{x,y,z},{t,0,Tmax},MaxSteps->Infinity];
sol=ParametricPlot3D[Evaluate[{x[t],y[t],z[t]}/.solution],{t,0,Tmax},PlotPoints->1000,AxesLabel->{x[t],y[t],z[t]},PlotStyle->{Thin,Red},LabelStyle->20,ImageSize->imagesize];
fixedpoints=Solve[{diffX==0,diffY==0,diffZ==0},{x,y,z}];
coordinates={x,y,z}/.fixedpoints;
fixedp=Graphics3D[{PointSize[0.02],Black,Point[coordinates]}];
Grid[{{Show[vecplot,fixedp],Show[vecplot,sol,fixedp]},
{Show[sol,fixedp],SpanFromLeft}},Frame->All]

Creation of this notebook was supported by IT Academy program of Information Technology Foundation for Education (HITSA).