Re: [Algorithms] Curve fitting problem
Brought to you by:
vexxed72
|
From: Jarkko L. <al...@gm...> - 2009-09-01 21:02:43
|
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:iv...@gm...] Sent: Tuesday, September 01, 2009 10:24 PM To: GDA...@li... 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 GDA...@li... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list |