clear;
//Parameters
o = 10;
r = 28;
b = 8/3;
// x=x(1), y=x(2), z=x(3)
function dx = LORENZ(t,x)
dx(1) = -o * x(1) + o * x(2);
dx(2) = r * x(1) - x(2) - x(1) * x(3);
dx(3) = - b * x(3) + x(1) * x(2);
endfunction
// The time range and step for calculation
Tin = 0;
Tout = 30;
Tstep = 0.001;
t = Tin:Tstep:Tout;
// The initial values
x10 = 20;
y10 = -60;
z10 = 10;
X10 = [x10; y10; z10];
X1 = ode(X10,0,t,LORENZ);
x20 = -30;
y20 = 40;
z20 = 80;
X20 = [x20; y20; z20];
X2 = ode(X20,0,t,LORENZ);
x30 = 20;
y30 = 50;
z30 = -10;
X30 = [x30; y30; z30];
X3 = ode(X30,0,t,LORENZ);
clf;
//param3d1( [X1(1,:), X2(1,:)], [X1(2,:), X2(2,:)], [X1(3,:), X2(3,:)] )
param3d(X1(1,:), X1(2,:), X1(3,:))
e=gce()
e.foreground=color('scilabred3');
e.thickness = 2;
param3d(X2(1,:), X2(2,:), X2(3,:))
h=gce()
h.foreground=color('blue');
h.thickness = 2;
param3d(X3(1,:), X3(2,:), X3(3,:))
t=gce()
t.foreground=color('forest green');
t.thickness = 2;
xlabel('x')
ylabel('y')
zlabel('z')