开发者

Spline interpolation: cubic vs. piecewise Hermite with C2 continuity [closed]

开发者 https://www.devze.com 2023-04-02 18:34 出处:网络
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed. This question is off-topic. It is not currently accepting answers.

Want to improve this question? Update the question so it's on-topic for Stack Overflow.

Closed 11 years ago.

Improve this question

I didn't get much of a bite in math.stackexchange.com, so I'll try here...

Recently, I've been looking to find the interpolating cubic spline of some data that I have. I think I have a pretty good understanding of how it works: take x,y data, plug into a tridiagonal matrix, solve for the 2nd derivative of y(i), and calculate coefficients from the 2nd derivative.

However, I ran across an article in Game Pr开发者_StackOverflow中文版ogramming Gems 5 which uses a cubic Hermite spline with C2 continuity. This article uses a tridiagonal matrix to solve the linear equations, but it's actually solving for the 1st derivative instead of the second. After some more investigation, I noticed that Scilab also uses a Hermite spline with C2 continuity. Their splin() function returns the slopes of the input data.

Is there any advantage to using a C2 Hermite spline over a plain old cubic spline when it comes to interpolating data? If both have C2 continuity, I don't quite understand why you would use one over the other.

Thanks!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号