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 中查找有关 Discrete Math 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!