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

8 ビュー (過去 30 日間)
mnera almansoorie
mnera almansoorie 2023 年 2 月 18 日
回答済み: Amal Raj 2023 年 3 月 14 日
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 件のコメント
mnera almansoorie
mnera almansoorie 2023 年 2 月 18 日
移動済み: Walter Roberson 2023 年 2 月 18 日
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
Torsten
Torsten 2023 年 2 月 18 日
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

サインインしてコメントする。

回答 (1 件)

Amal Raj
Amal Raj 2023 年 3 月 14 日
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)

カテゴリ

Help Center および File ExchangeGet Started with Curve Fitting Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by