0% found this document useful (0 votes)
49 views3 pages

R (T) Sin T I+cost J+T K T 0: Vectors

The document describes the motion of a particle moving in 3D space represented by the vector r(t)=sin(t)i+cos(t)j+t^2k from t=0 to 8π. It computes the velocity and acceleration vectors, plots the position, velocity and acceleration vectors, and calculates the length of the curve and curvature of motion.

Uploaded by

ramsastry
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views3 pages

R (T) Sin T I+cost J+T K T 0: Vectors

The document describes the motion of a particle moving in 3D space represented by the vector r(t)=sin(t)i+cos(t)j+t^2k from t=0 to 8π. It computes the velocity and acceleration vectors, plots the position, velocity and acceleration vectors, and calculates the length of the curve and curvature of motion.

Uploaded by

ramsastry
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Vectors:

Consider the motion of a particle represented in vector form by r ( t )=sin t i+cos t j+ t 2 k between
the time instants t=0 to 8 π. Compute the velocity and acceleration vectors. Visualize the motion
of this particle by plotting all the three vectors in a single plot.

d
The velocity vector is given by, v ( t )= r (t)
dt
d
The acceleration vector is given by, a ( t )= v (t)
dt
T T
dx 2 dy 2 dz 2
Length of the curve is given by, s=∫ ‖v ( t)‖dt=∫
0 0 √( dt)( )( )
+
dt
+
dt
dt

d T d T /dt v(t)
Curvature is defined by, κ= = , where T =
ds ds /dt ‖v(t)‖

MATLAB code

clear; clc;

%%
p=@(x) [sin(x),cos(x),x*x];

%%
syms x;
velocity=diff(p(x),x)
vel=matlabFunction(velocity);
acceleration=diff(velocity,x)
acc=matlabFunction(acceleration);
%%
time_start=0;
time_end=4*2*pi;
n=30;
dtime=(time_end-time_start)/n;

%%
i=0;

for t=time_start:dtime:time_end
i=i+1;

pos=p(t);
x(i)=pos(1);
y(i)=pos(2);
z(i)=pos(3);

vel=eval(subs(velocity,t));
vx(i)=vel(1);
vy(i)=vel(2);
vz(i)=vel(3);
velmag(i)=sqrt(vx(i)^2+vy(i)^2+vz(i)^2);

a=acc(t);
ax(i)=a(1);
ay(i)=a(2);
az(i)=a(3);
accmag(i)=sqrt(ax(i)^2+ay(i)^2+az(i)^2);
end

f=matlabFunction(sqrt(dot(velocity,velocity)))
length=integral(f,time_start,time_end)

%%
hold on;
plot3(x,y,z,'-o');
q=quiver3(x,y,z,vx,vy,vz,'r')
q.MaxHeadSize=0.001;
q.AutoScaleFactor=0.1;
quiver3(x,y,z,ax,ay,az,0.003,'b')
axis vis3d

You might also like