clf
figure(1)
t=linspace(-5,5,100);
x=sin(t);
y=t.*cos(t);
z=t.^2-t;
plot3(x,y,z)
grid
hold on
s=linspace(-5,5,100);
pause
for n=1:length(s)-1
    t=linspace(s(n),s(n+1),5);
    x=sin(t);
    y=t.*cos(t);
    z=t.^2-t;
    plot3(x,y,z,'r','LineWidth',2)
    pause(0.01)
end
axis(axis)
pause
for n=1:length(s)-1
    t=linspace(s(n),s(n+1),5);
    x=sin(t);
    y=t.*cos(t);
    z=t.^2-t;
    plot3(x,y,z,'r','LineWidth',2)
    quiver3(x(1),y(1),z(1),cos(t(1)),cos(t(1))-t(1).*sin(t(1)),2*t(1)-1)  
    pause(0.01)
end
pause
for n=1:length(s)-1
    t=linspace(s(n),s(n+1),5);
    x=sin(t);
    y=t.*cos(t);
    z=t.^2-t;
    plot3(x,y,z,'r','LineWidth',2)
    quiver3(x(1),y(1),z(1),-sin(t(1)),-2*sin(t(1))-t(1).*cos(t(1)),2)  
    pause(0.01)
end
hold off