curve to fit a series of points

Started by
6 comments, last by Sneftel 18 years, 8 months ago
spline, polyline, bspline, NURB, bezier, catmull-rom? what should i use?
Advertisement
Why do you need to fit the points? Do you need to interpolate or extrapolate? Does it matter if your curves are piecewise second order continuous? First order continuous?
it's for interpolation, and the curve needs to hit all points on the path. the problem i'm having is how to generate the control points.
Well, both a polyline and a b-spline will hit all points on the path. But they look completely different; a polyline is made up of straight lines with sharp bends at the points (what SiCrane was talking about with first-order continuity) whereas a b-spline is smoother. Use whatever curve formulation fits the visual results you're trying to achieve.
bsplines it is then. how do you generate the control points for the curve to pass through all the points on the path, though?
You can basically solve a system of equations which sets the vertices as the internal knots of the spline.

Alternatively, BTW, you could use a bezier spline, with the tangent for a point P(n) equal to (P(n+1)-P(n-1))/2. I forget what this method is called..... someone chime in?
http://www.cubic.org/docs/hermite.htm

found this, sounds like catmull-rom is what i'm after. can anyone confirm this?
Catmull-Rom splines are equivalent to Bezier curves with the tangent generation I described.

This topic is closed to new replies.

Advertisement