Archived

This topic is now archived and is closed to further replies.

tmwsiy

3D Curve Fitting

Recommended Posts

there must be a very simple alogrithm for this, unfortunately I can not find it. I know about the 2d curve fitting alg. but either 1. I can''t figure out how to generalize it to 3-dimensions or 2. It can''t be done by these algorithms. So if I have a set of say 10 points that all have (x,y,z) how to I fit a curve so that it hits these points? thanks in advance..

Share this post


Link to post
Share on other sites
This might work...

Pick an independent variable, say z, preferably the axis with the greatest variation between extremes in the point set (axis in the directino of which the cloud of points is the longest).

Now fit curves for x = f(z) and y = g(z) just like you normally would in 2D.

Edit: This would work best for least-squares fitting, in which case you can have two or more of the same f(z) value for a given z in your set of points. If you don't know this to be the case, you probably can't fit an exact curve to the set of points. You would have the same problem in 2D fitting points that cannot all be described by a single function (ie. some of the domain maps to more than one point in the range. There's a fancy word for this that I forget.).

[edited by - Geoff the Medio on July 25, 2003 6:52:25 PM]

Share this post


Link to post
Share on other sites
The Catmull-Rom Alg. seems like the right thing to fit a line (curve) between a set of points, when I want to hit all of the points.....I''m writing in opengl, but thanks for the link, I''ll see if I can figure it out.
Thanks..

Share this post


Link to post
Share on other sites