%5agosto2010
clear all
clc
close all
deltat=0.0001;
%deltat=0.0001;%43agosto
%N=20000;%43agosto
N=1000000;
x1=zeros(N,1);
x2=zeros(N,1);
x1(1)=pi-pi./6;%angulo
x2(1)=0;%velocidad angular
n=1;
while n<=N-1
    x1(n+1)=deltat.*x2(n)+x1(n);
    x2(n+1)=-deltat.*sin(x1(n))+x2(n);
    n=n+1;
end
x3=-sin(x1);%aceleracion angular



#figure(1)
#plot3(x1,x2,x3,'r')
#grid on


figure(1, "visible", "off");
plot3(x1,x2,x3,'r');
grid;
print -deps "../media/pendulo_0.eps";
