MATLAB Answers

How to plot multiple unit tangent vector along a 3D curve using quiver3

4 views (last 30 days)
MARCOS DOS REIS
MARCOS DOS REIS on 29 Oct 2020
Edited: VBBV on 21 Nov 2020
Hi,
I am to sketch the curve r(t) = <t,t^2,t^3> t E [0,2] and the unit tangent vector at several locations along the curve.
Can anyone help?
This is what I got to plot the curve, and I can't seem to figure out how to use quiver 3. Thanks!!
t = linspace(0, 2, 80);
x1 = t;
y1 = t.^2;
z1 = t.^3;
TangentUni= 1/sqrt(1+4t.^2+9t.^4), 2*t/sqrt(1+4t.^2+9t.^4), 3*t.^2/sqrt(1+4t.^2+9t.^4)
figure
plot3(x1,y1,z1,"m", "LineWidth",2)

  0 Comments

Sign in to comment.

Accepted Answer

VBBV
VBBV on 21 Nov 2020
Edited: VBBV on 21 Nov 2020
t = linspace(0, 2, 80);
x1 = t;
y1 = t.^2;
z1 = t.^3;
TangentUni = 1./sqrt(1+4*t.^2+9*t.^4), 2*t./sqrt(1+4*t.^2+9*t.^4), 3*t.^2./sqrt(1+4*t.^2+9*t.^4)
figure
quiver(x1,y1,TangentUni,z1)

  0 Comments

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!