set(gcf,'visible','off')
set(gca,'fontsize',14)
x0=10;
y0=0;
z0=3;
vx0=3;
vy0=5;
vz0=386;
l=30*pi/180;
i=60*pi/180;
g=9.8;
t=0:0.1:40;
v1=55:-1:1;
v2=360:-1:55;
v3=linspace(55,85,40);
v=[v1,v2,v3];
for j=1:401
x=x0+vx0*cos(l)*cos(i)*t(j);
y=y0+vy0*cos(l)*sin(i)*t(j);
z=z0+vz0*sin(l)*t(j)-(g*t(j)^2)/2;
plot3(x,y,z,'o','markersize',9)
box off
title('Trayectoria')
xlabel('Eje X [m]')
ylabel('Eje Y [m]')
zlabel('Eje Z [m]')
axis([10 70 0 155 -150 2100])
view(v(j),20)
hold on
filename=sprintf('grafos/%05d.png',j);
print(filename)
end

