Re: Curve fitting problem

"Jarkko Lempiainen" <[email protected]>
Newsgroups gmane.games.devel.algorithms
Message-ID <224BFFCBAD8545CF86AF03D1C73DD102@Tikru>
Not exactly what you are looking for, but I have some code online which
iteratively fits a spline constructed of cubic curves to a set of n-d points
within given tolerance constraints (e.g. distance, velocity, etc.) It also
assumes that the input keys are evenly distributed on a timeline. This is
mainly meant for animation key frame compression (position & rotation), but
might be a useful reference for you. It's the fit_spline() function of the
following link:

http://spinxengine.svn.sourceforge.net/viewvc/spinxengine/src/core/math/para
metric.inl?view=markup

... and here is some unit test code for use cases (search for fit_spline):

http://spinxengine.svn.sourceforge.net/viewvc/spinxengine/src/unittest/core/
math/parametric.cpp?view=markup


Cheers, Jarkko


-----Original Message-----
From: Ivan Vorobeychyk [mailto:[email protected]] 
Sent: Tuesday, September 01, 2009 10:24 PM
To: [email protected]
Subject: [Algorithms] Curve fitting problem

Hi, guys.

I have a problem that I think has been solved many times,
hope somebody can point me to appropriate technique.

I have an ordered set of points in 2-d space, that represents a curve
(like set of pixels, drawn with pencil in Paint).
I need to build SMOOTH spline that will pass EXACTLY through CERTAIN
of these points (control points) and will pass CLOSE to other points
from the given set.

Any help much appreciated.
Thanks,
Ivan

----------------------------------------------------------------------------
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus
on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
GDAlgorithms-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
GDAlgorithms-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.