-
Notifications
You must be signed in to change notification settings - Fork 114
Free(OnGrid()) boundary conditions produce surprising results #570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You've encountered https://en.wikipedia.org/wiki/Runge%27s_phenomenon |
I have never seen such a bad case of it for not-a-knot cubic splines - especially for such a simple function. The true curve appears almost linear at the boundary but the cubic polynomial is totally different... I suppose more nodes is the only answer? |
Perhaps. The reality is that you probably only need more nodes near the boundaries.
Have you tried Also consider |
Thanks for the recommendations - I did not know about BSplineKit.jl. I thought that "The following boundary conditions are implemented: Flat, Line (alternatively, Natural), Free, Periodic and Reflect." |
Is this fixed by #616 ? |
I'm interpolating a 3-dimensional regular surface with
scale(interpolate(Espldata, BSpline(Cubic(<bc>)))
where is eitherLine(OnGrid())
orFree(OnGrid())
. I am confused by the below result, which is a 1D slice through the grid with the other two parameters being grid points. Why do the Free boundary conditions behave so poorly? My impression is that Free BCs are the same as not-a-knot (continuity in third derivative for second-last spline knot) but this is clearly not what is happening here.The text was updated successfully, but these errors were encountered: