#Lorentz attractor
#plots the orbit of the point (1,1,1) using the simplest euler method
h=0.01; # time step
k=2000 # number of iterations (time k*h will be reached)
sigma=10; #parameters
rho=28;
beta=8/3;
x=1; y=1; z=1; # initial data
puntos=[]
for i in range(k):
x,y,z=x+h*( sigma*(y-x) ), y+h*( x*(rho - z) - y ), z+h*( x*y - beta*z )
puntos.append((x,y,z))
point3d(puntos)