So far I have a plot for r(t) = [cos(t),sin(2*t), cos(2*t)] from 0 to 2*pi. I need to be able to plot the Frenet frame vectors at various points on the plot, say 5 different points. I've been given the following equations for the unit vectors t, n, and b:
where r = R(t) = [t*cos(t), t*sin(2*t),t] and r' and r'' are the first and second order time derivatives of R(t), respectively. Here is the code I have so far:
syms tR = [t*cos(t), t*sin(2*t), t];R_dot = diff(R,t)R_ddot = diff(R_dot,t)r = [cos(t), sin(2*t), cos(2*t)];fplot3(r(1),r(2),r(3),[0,2*pi])hold onfor t = 0:2*pi th = R_dot/norm(R_dot) bh = cross(R_dot,R_ddot)/norm(cross(R_dot,R_ddot)); bh = bh/norm(bh); nh = cross(bh,th); quiver3(cos(t),sin(2*t),cos(2*t),th(1),th(2),th(3),'r');end
When I run the code, I get the error, 'Unable to convert expression into double array.' Any help is appreciated.
Best Answer