Determination of a curve with a given curvature

1 次查看(过去 30 天)
Hello! I have a set of points and I have to calculate the curvature. To find the curvature I made this simple code, which solves a linear system:
curv = zeros(1, length(x));
rad = zeros(1, length(x));
circ = zeros(length(x), 3);
for i = 2:length(x)-1;
M = [x(i-1) y(i-1) 1; ...
x(i) y(i) 1; ...
x(i+1) y(i+1) 1];
V = [x(i-1)^2 + y(i-1)^2; ...
x(i)^2 + y(i)^2; ...
x(i+1)^2 + y(i+1)^2]; ...
circ(i, :) = (- M^-1 * V)';
rad(i) = sqrt(circ(i, 1)^2/4 + circ(i, 2)^2/4 - circ(i, 3));
curv(i) = 1/rad(i);
end
Now, how do I get back the x and y starting from the curvature? I tried with a simple cumtrapz, but it doesn't seem to work...
Thank you!

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Mathematics and Optimization 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by