How to find the arclength and radius of curvature for a set of 3D data points?

35 次查看(过去 30 天)
I have a set of 3-D points that represent the coordinates of a curve. I need to find the arclength and radius of curvature of this curve. How might I go about doing this? I've tried fitting the data to a polynomial but it doesn't seem to be working. Please Help!
  5 个评论
Matthew Wong
Matthew Wong 2018-11-12
Thanks for the feedback guys! I've attached my data this time. Basically right now I try to break up the data into smaller sections that encompass only one section of the curve so that it better fits a polynomial. Then I use the 'fit' equation to go through and try to fit a polynomial to each section. Then I try to find the arclength of each section (Right now I'm only trying to calculate the arclength, after I get a correct fit for the data I'll move on to radius of curvature).
if true
%Initialize empty arrays and variables to prevent memory overload
syms s x y;
Pts = zeros(100,3);
magnitudes = zeros(99,1);
dx = zeros(99,1);
dy = zeros(99,1);
dz = zeros(99,1);
dscore = zeros(99,1);
magdiff = zeros(99,1);
Sigpts = zeros(100,3);
lowbound = 1;
fitdata=zeros(100,3);
arclength=zeros(100,1);
%Load points into a 100 x 3 array
for j=1:100
Pts(j,1) = xpts(j);
Pts(j,2) = ypts(j);
Pts(j,3) = zpts(j);
end
%Plot the curvature
%plot3(Pts(:,1),Pts(:,2),Pts(:,3));
% grid on;
hold off;
end
Matthew Wong
Matthew Wong 2018-11-12
Update: I had some trouble posting my entire code, but I've attached the MATLAB file above.

请先登录,再进行评论。

采纳的回答

Are Mjaavatten
Are Mjaavatten 2018-11-16
编辑:Are Mjaavatten 2018-11-16
I was inspired by your question to write a functon that calculates the arc length and curvature of a 1D curve in 2D or 3D space. I believe that does what you want. I submitted it to The Mathworks File Exchange today. You will find it here.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Least Squares 的更多信息

产品


版本

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by