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

35 views (last 30 days)
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 Comments
Matthew Wong
Matthew Wong on 12 Nov 2018
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 on 12 Nov 2018
Update: I had some trouble posting my entire code, but I've attached the MATLAB file above.

Sign in to comment.

Accepted Answer

Are Mjaavatten
Are Mjaavatten on 16 Nov 2018
Edited: Are Mjaavatten on 16 Nov 2018
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.

More Answers (0)

Products


Release

R2016b

Community Treasure Hunt

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

Start Hunting!