function F = curvetan3(r,t,a,b,x0,x1,y0,y1,z0,z1,az,el) % curvetan3 plots the space curve r(t) and, one at a time, % tangent vectors at 100 equally spaced times in the interval [a,b]. The % plots are saved as frames with the name F for use with the command movie % or movieview or some other MATLAB movie player. The axis for each frame % is the same, with x-limits x0,x1, ylimits y0,y1, and z limits z0,z1. The % optional arguments az and el change the view in all the frames from the % default to view([az el]) if nargin < 11 az = -37.5; el = 30; end rx = inline(vectorize(r(1))); ry = inline(vectorize(r(2))); rz = inline(vectorize(r(3))); rp = diff(r); c = (b-a)/100; T = a:0.01:b; for j = 1:100 clf plot3(rx(T),ry(T),rz(T),'LineWidth',2) hold on quiver3(rx(a+j*c),ry(a+j*c),rz(a+j*c),... subs(rp(1),t,a+j*c),subs(rp(2),t,a+j*c),subs(rp(3),t,a+j*c),1,... 'LineWidth',2) axis([x0 x1 y0 y1 z0 z1]) view([az el]) F(j) = getframe; end