- /
-
Lorenz Attractor
on 25 Oct 2021
- 6
- 24
- 0
- 0
- 278
figure(color='k');
n=1e5;
f=1:n;
g='interp';
for k=1:3
x=rand(n,3);
for i=1:n-1
a=x(i,1);
b=x(i,2);
c=x(i,3);
x(i+1,:)=x(i,:)+[10*(b-a) a.*(28-c)-b a.*b-8/3*c]*1e-3;
end
x(end,:)=nan;
patch(x(:,1),x(:,2),x(:,3),f',EdgeColor=g,FaceVertexAlphaData=f',EdgeAlpha=g);
end
view([196 17]);
axis off;
colormap winter;