Find the curvature of the curve traced out by the function r(t)=〈 t^2, 5t-1, 2t^3 -t 〉 at t=1.

syms t
f = t^2;
g = (5*t) - 1;
h = 2*t^3 - t;
r = [f, g, h]; % r(t)
dr = diff(r, t); % r'(t) = tangent to the curve
T = dr / norm(dr); % normalized r'(t) = T(t) = unit tangent to the curve
dT = diff(T, t); % T'(t)
k = norm(dT)/norm(dr); % Curvature at a given t ( k = ||T'(t)|| / ||r'(t)|| )
k = subs(k, 1); % Curvature at t = 1
can someone help me correct my code
my code is getting correct numbers but i need to incllude A,B, K and define R

3 commentaires

What are A,B,K and R? You say you need to include them, but if you don't tell anyone what they are, how can someone help you? Basically, you seem to have made a start, but to go beyond that, someone needs to have some idea what is the target.
R is the r(t) K is the formula A derivative B derivative
It's a Mathlab assignment and I keep getting 20/100 so I don't know what's wrong
The formula I know to calculate curvature of a parametric curve differs from the one you use.
Look up the section "Space curves: General expressions" under

Connectez-vous pour commenter.

Réponses (1)

Hi,
Here is the corrected code:
syms t
f = t^2;
g = (5*t) - 1;
h = 2*t^3 - t;
r = [f, g, h]; % r(t)
dr = diff(r, t); % r'(t) = tangent to the curve
T = dr / norm(dr); % normalized r'(t) = T(t) = unit tangent to the curve
dT = diff(T, t); % T'(t)
k = norm(dT)/norm(dr); % Curvature at a given t ( k = ||T'(t)|| / ||r'(t)|| )
k = subs(k, 1); % Curvature at t = 1
N = dT / norm(dT); % normal vector N(t) = (T'(t)) / (||T'(t)||)
B = cross(T, N); % binormal vector B(t) = cross(T(t), N(t))
r1 = subs(r, t, 1); % r(1)
N1 = subs(N, t, 1); % N(1)
B1 = subs(B, t, 1); % B(1)
syms A B
R = r1 + A*N1 + B*B1 % osculating circle at t = 1
% Now we need to find A and B that satisfy the condition R(1) = r(1) and R'(1) = T(1)
eq1 = R == r1;
eq2 = diff(R, t) == T;
[A, B] = solve(eq1, eq2, A, B);
% Finally, we can evaluate R, A, and B at t = 1
R = subs(R, [A, B], [A, B]);
A = double(A)
B = double(B)
K = 1 / norm(R - r1)

Catégories

En savoir plus sur Particle & Nuclear Physics dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by