Find the curvature of the curve traced out by the function r(t)=〈 t^2, 5t-1, 2t^3 -t 〉 at t=1.
6 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
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
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)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Particle & Nuclear Physics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!