beating Natural Cubic Splines once and for all

Started by
2 comments, last by NatasDM 16 years, 2 months ago
I am officially sick and tired of searching for spline related resources. Every site that I have looked on either said "there's lots of info on the net so we wont go deaper into that here, just google" or was full of complicated math (look at page 5 in this thing). Even though I found that page very informative at first the math eventually grows too complex or just simply confusing (the use of "x" with the index "i" to denote serveral different things in the aforementioned paper for example). To clarify, Im looking for Natural Cubic Splines (only). If someone could tell me what other names is used to describe the exact same thing I would be grateful. what Im interested in is how to programatically (doesnt need to be code, but more or less step by step would be nice) generate the coefficients of the segments. Also, a quick and easy way of determening to what segment an passed x value belongs. Im using C++ with STL containers for my data. Thanks in advance, I think many people would enjoy a straightforward answer to this. PS. Even though I've taken collage courses Mathematics A,B,C,D,E & Discrete my maths knowlage doesnt quite cover everything needed for writing an article. I would however consider posting something somewhere to sum up the answers I get to this. /thunder sky
Advertisement
Fitting Natural Splines to Samples of the form (t,f(t))

Source code is at my Curves page (1D, 2D, 3D).
I've always used this document as a reference. It's straight to the point.
How about a demo with source code and useful features like picking and tangent vectors:

Free Source Code for Natural Cubic Splines class (used in games like Zuma, Puzzloop, Atlantis, Luxor, etc..)

Includes a Demo app for an Editor (with saving in XML format). Written for the Popcap framework although easily portable.

Class also includes picking functions for selecting and editing the spline paths and control points.

http://mooktown.blogspot.com/2007/08/source-code-for-zuma-paths.html

http://mooktown.blogspot.com/2007/08/source-code-for-zuma-paths.html

This topic is closed to new replies.

Advertisement