Questions tagged [spline]

A smooth piecewise-defined curve formed by joining segments together, end-to-end. The segments are usually described by polynomial or rational functions. Splines are typically used for approximation or data fitting.

A spline is a special function defined piecewise by polynomials. In interpolating problems, spline interpolation is often preferred to polynomial interpolation because it yields similar results, even when using low degree polynomials, while avoiding Runge's phenomenon for higher degrees.

In the computer science subfields of computer-aided design and computer graphics, the term spline more frequently refers to a piecewise polynomial (parametric) curve. Splines are popular curves in these subfields because of the simplicity of their construction, their ease and accuracy of evaluation, and their capacity to approximate complex shapes through curve fitting and interactive curve design.

627 questions
1
vote
1 answer

natural cubic spline

I am currently learning how to do small natural cubic spline problems by hand. I was doing quite well, since most of the problems gave 3 points to begin with (two intervals). I then ran into a problem that has 5 points $f(0.5)=2$, …
1
vote
2 answers

How do I create a bezier spline section out of many points?

I am building a program where I need to simplify N number of points into a single section of a bezier spline, ie describe them using just 2 end points and 2 control points. Naturally this will lead to some loss of information, but I would like the…
1
vote
1 answer

Does the spline between two points depend on other points that are *outside* the interval between these two points?

Let's consider taken from https://fr.wikipedia.org/wiki/Spline#/media/Fichier:Exemple_de_spline_de_degr%C3%A9_3.png Let's call the red points as : point 1, point 2, point 3, point 4. I'm wondering if the spline part (the blue smooth line) between…
1
vote
0 answers

Are there multiple Akima splines through a set of sample points?

The Wikipedia page on Akima splines (https://en.wikipedia.org/wiki/Akima_spline) is clear on how the spline is defined between the third sample point and the n-2 sample point. It is not very clear on how the curve is defined before the third sample…
awlman
  • 33
1
vote
0 answers

3D Catmull spline intersection with a 2D plane

I am developing a 2D side scroller game with Unity. Since I want to have parallax background and camera zoom, maybe some other 3D effects, like shadows and such, I am Programming it in 3D. I am aware that there are libraries that handle camera…
1
vote
0 answers

CubicSpline interpolation with $x = (0, \frac{1}{4}, \frac{1}{2}, \frac{3}{4},1)^T, y = (1, 0 , 2, -1, 1)^T $

$x = (0, \frac{1}{4}, \frac{1}{2}, \frac{3}{4},1)^T, y = (1, 0 , 2, -1, 1)^T$ Here is what I tried, but it looks like I have too many equations in comparison to unknowns. $$\left[0, \frac{1}{4}\right]: S_0(x) = a_0 + b_0(x-0) + c_0 (x-0)^2 +…
user
  • 1,412
1
vote
1 answer

Bspline values at end points

Using for example Wolfram alpha definition of Bspline basis functions, the basis functions of order p=3 (cubic) and knotvector = [0,0,0,0, 0.2, 0.5, 0.5, 0.5 , 0.8, 1,1,1,1] looks like this: As you can see, the last basis function approaches one as…
lijas
  • 129
1
vote
2 answers

B-Spline how to create control points for a curve to pass through knot values

I want to create a b-spline curve that will pass through all the (knot) points I give it. How do I construct it? Do I need to find the control points for that curve? And if so - how?
1
vote
0 answers

find local min and max of natural cubic spline

My question is simple: is it possible to calculate the local maximums and minimums for data fitted with a natural cubic spline? If yes, how would I approach this problem? I work on large genome wide datasets, and my hope was to fit polynomial…
Phil_T
  • 111
1
vote
0 answers

Algorithms for calculating intermediate points for a spline

So there is a given set of control points $P_1, P_2... P_n$. I need to calculate additional 2 points for each pair of points, e.g. $S_{11}, S_{12}$ for $P_1$ and $P_2$. From the 4 points $P_1, S_{11}, S_{12}, P_2$ I could create a cubic spline to…
andras
  • 113
  • 3
1
vote
1 answer

Does spline function contains normal function

Usually we say a spline is a function that is piecewise defined by polynomial functions with high degree of smoothness. Thus the `usual' spline function has several polynomial segments. I am wondering a `normal' function, which has only one…
skyindeer
  • 123
1
vote
0 answers

Do not a knot splines force continuity at each knot?

Given a cubic spline equation $S(x) = S_0(x), S_1(x), S_2(x)$ Does it follow the continuity rules where $S_0(x_2) = S_1(x_2)$ and $S_1(x_3) = S_2(x_3)$ assuming x1 is the starting point and $x_4$ is the end point?
johnson
  • 519
1
vote
1 answer

Can a cubic spline be both relaxed and clamped?

I am curious if a spline can be both relaxed (second derivative = 0 at both endpoints) and clamped (first derivative is explicitly defined at both endpoints). This only needs to be true for a single spline between two end points. If this is not…
1
vote
0 answers

Extrapolation and linear splines

Can you use a linear spline for extrapolation? Say you have data (6,1.04),(7,1.71),(9,3.28),(10,4.08); and you wanted to evaluate at x=17. I thought that extrapolating using linear splines was a bad idea--is that true?
PJS
  • 11
1
vote
0 answers

B spline - Partition of unity

I need the Laplace form of the second order B splines over logarithmically-spaced knot. I have read a paper in which it is mentioned that ; " Heaviside function can be represented as the sum of all b-splines with indices from negative to positive…
Ehsan
  • 11