Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have a set of points in 3D which I need to fit a curve (not a plane) to. Essentially these points describe a string with a set order (i.e. point one connects to point two, etc.) and I need to fit a curve to follow these points and produce a smoothed, single-width string as a result.

Unfortunately all of the 3D fitting algorithms I've found so far (I'd probably go with polynomial fitting) result in a plane, not a line, and it's lead me to believe what I need is a 2D fitting algorithm which operates on three sets of coordinates.

I can work out how to do linear interpolation for these points, it's figuring out the polynomial that I'm struggling with. Does anybody have any helpful pointers for this?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Since your points are already in a specified order, you could try fitting the $x$, $y$, and $z$ coordinates independently as functions of the index of the point in the ordering. That is, if you have points $(x_1,y_1,z_1)$, $(x_2,y_2,z_2)$, and so on, you fit $x_i$ as a function of $i$, then $y_i$ as a function of $i$, and $z_i$ as a function of $i$. Then your curve is given by $t\mapsto(x(t),y(t),z(t))$.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.