Re: [Algorithms] Curve fitting problem
Brought to you by:
vexxed72
|
From: David B. <dbe...@na...> - 2009-09-01 22:47:00
|
That sounds like a great idea. It seems to me that the one tricky bit will be to break up the spline curve segments from the spline that goes through only some points into multiple segments to make the interpolation between curve segments work. For curves that pass through all the points I would recommend the Catmul-Rom algorithm, a special case of the Cubic Hermite spline given earlier (and listed on that wikipedia page -- http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Catmull.E2.80.93Rom_spline) David Bennett NAMCO BANDAI Games America Inc. ________________________________ From: Juan Linietsky [mailto:re...@gm...] Sent: Tuesday, September 01, 2009 2:32 PM To: Game Development Algorithms Subject: Re: [Algorithms] Curve fitting problem My suggestion may feel hackish but i think it gets the closest to what you may need. Just use a cubic spline between the points you want to pass by for sure, and ignore the others. Use a second cubic spline that goes through ALL the points. Interpolate both to the measure you want, and you should have a curve that passes by some points and gets close to the others. On Tue, Sep 1, 2009 at 4:23 PM, Ivan Vorobeychyk <iv...@gm...<mailto:iv...@gm...>> wrote: 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...<mailto:GDA...@li...> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list |