Re: Curve fitting problem

David Bennett <[email protected]>
Newsgroups gmane.games.devel.algorithms
Message-ID <[email protected]>
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:[email protected]]
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 <[email protected]<mailto:[email protected]>> 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
[email protected]<mailto:[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.