Determination of a curve with a given curvature
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Mathematics and Optimization en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!