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.

184 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
10
votes
0answers
1k views

What is the maximum overshoot of interpolating splines in $d$ dimensions?

Consider cubic splines $s( x, y )$ which interpolate values $y = \{ y_0, y_1, \dots,y_n \}$, on the uniform grid $\{ 0, 1,\dots, n \}$. Fix $s''(0) = s''(n) = 0$ (natural splines). How big can $$\...
8
votes
0answers
144 views

Why Are Fresnel Functions Used For Splines?

Why are Fresnel functions still used in the research and implementation of clothoid splines? They cannot represent curves of constant curvature, which has led to a lot of research/implementation ...
4
votes
1answer
95 views

Estimating Spline curve by OLS. Is a good idea to fix the knots at Chebyshev sites?

I am writing my master's degree thesis on a novel method for fixing knots in an adaptive way and while reading the literature I've found many references to the so-called Chebyshev sites. This sites or ...
4
votes
0answers
225 views

B-splines and Catmull-Clark subdives. What are the similarities between them?

I've a special question between mathematics and 3d. I struggle for two days understand relation between B-splines and Catmull-Clark subdivs. Everywhere wrote the Catmul-Clark subdivs is based on ...
3
votes
0answers
40 views

Approximating the intersection of a line and the iPhone X screen as well as its normals

I am creating a simulation where little, fast moving, particles need to intersect with the edges of the iPhone X screen. Previously I have had no difficulty with my collisions. The particles have ...
3
votes
3answers
840 views

Cubic Spline Interpolation - Solve X from Y

I'm a programmer, not a mathematician, but I've got a real-world problem I'm trying to solve that's out of my league, and my Google skills so far have failed me. I have an analog waveform that's been ...
3
votes
0answers
200 views

How do the different ancillary conditions for splines differ?

I'm currently learning how spline interpolation works. I guess you could directly jump to "questions", but I wanted to give some context in case I missunderstood something. Splines - short ...
3
votes
1answer
726 views

Interpolation method that does never overshoot

for implementing a system that will control hardware, I need an interpolation between points on a graph that does never overshoot. By overshooting I mean that between two points there may be no y-...
2
votes
1answer
31 views

how to perform spline interpolation on GPS coordinations?

this may look like a programming problem but actually it have to do with math more than programming. I have GPS coordinations in a csv file that I predict it using a regression model, just two ...
2
votes
1answer
118 views

3D Spline interpolation

I have 3D data i need to interpolate via Spline. My data is a set of (x,y,z) on an irregular grid. I have to find the z of some x,y not on the grid. I can't use any library since i have to manually ...
2
votes
0answers
180 views

Natural Cubic Spline beyond boundary guarantees constant slope?

my understanding is that for if I have five points, I can interpolate a natural cubic spline out of any five points with increasing x, because degree of freedom is five. But when I try the python ...
2
votes
0answers
103 views

Determine the values of the following function is a natural cubic spline.

$$s(x)=\begin{cases} 3+ax-9x^2+bx^3,\quad &1\le x\le 2\\ 1+c(x-2)+d(x-2)^2+t(x-2)^3, &2\le x\le 3 \end{cases} $$ This is what I have: $$\begin{cases} s_1= bx^3-9x^2+ax+3 &s_2= t(x-2)^3+d(...
2
votes
0answers
48 views

Fitting a spline: find coefficients using Fourier Transform?

I came up with a idea to estimate the coefficients of a B-spline fit by using the Fourier Transform but I don't know if it makes any sense to estimate them in this way. Given that $$s(x)=\sum_kc(k)\...
2
votes
0answers
202 views

Giving a point on a uniform bspline curve, how to get the tangent vector of this point

A bspline curve of order $k$ is given by $$C(t) = \sum_{i=0}^n P_i N_{i,k}(t).$$ where $P_i$ are the control points and $N_{i,k}(t)$ a basis function defined on a knot vector $$T = (t_0,t_1,...t_{n+k})...
2
votes
1answer
198 views

Minimization problem with latent function and splines

I have a dataset consisting of pairs $(x_i, y_i)$. I want to determine the function $f$, so $$ f(x)f(y) = 1 $$ with the constraint that $f(x) \leq x$, $f'(x) \geq 0$ and $f''(x) \geq 0$. I was ...
2
votes
0answers
42 views

B-spline surfaces fitting references

I am looking for reference papers / publications regarding b-spline / NURBS surfaces fitting (I think I have noticed NURBS fitting is not very widespread so I guess most references will be related to ...
2
votes
0answers
38 views

How to interpolate figure with splines?

Lets say I have a set of coordinates which when correctly (directly - a straight line) connected form a shape (a simple curve if you will). Think of star-shape, important is that a xalue x might have ...
2
votes
0answers
346 views

Random non-intersecting cubic bezier curves between prescribed anchor points

I am given 4 pairs of red-green points in 2D. each pair corresponds to end points of a cubic bezier curve. My objective is to generate random control points for 4 curves (one going through each pair) ...
2
votes
0answers
168 views

How to generate variable pitch helix in nurbs form

I would like to define a helix with a start pitch end pitch start radius end radius start angle The pitch and radius parameters should be interpolated linearly from each end along the length of the ...
2
votes
0answers
170 views

Fitting an Akima Spline curve

I'm trying to fit an Akima Spline curve using the same method as this tool: https://www.mycurvefit.com/share/4ab90a5f-af5e-435e-9ce4-652c95c3d9a7 This curve gives me the exact shape I'm after for my ...
2
votes
0answers
559 views

Derivation of B-Spline basis function recursion formula

Can anyone explain the logic behind the derivation of the seemingly magical b-spline basis function recursion formula (deBoor-Cox) $N_{i,0}(u)=1 $ if $u_i\leq u < u_{i+1}$ otherwise, $=0$ $...
2
votes
0answers
365 views

Fitting a continuous curve over a piecewise constant data

I have some measurements that are piecewise constant over a certain variable. For example, in the following image, the vertical axis represents the measurement data and the variable is on the ...
2
votes
0answers
537 views

How to Find the Error for Spline Interpolation Without the Original Function?

Most of the literature (e.g.: http://pages.cs.wisc.edu/~amos/412/lecture-notes/lecture11.pdf) I have consulted thus far indicates how one would determine the error of a cubic when the original ...
2
votes
0answers
357 views

What do quadratic smoothing splines minimize?

Cubic smoothing splines minimize a combination of Interpolation cost and Smoothness (roughness) cost: $\qquad$ min Icost + $\lambda$ Scost where $\qquad$ Icost $\equiv \sum (Y_i - \mu(x_i))^2$ $\...
2
votes
0answers
303 views

B-Spline Definition

I'm currently working on my master's project. For this, I rely on one PhD-thesis in which I found a statement I do not understand. Unfortunately, the author hasn't answered to my mails yet, so I have ...
1
vote
0answers
14 views

Slope matching in spline interpolation

When using a Curve parameterization, I build segment functions as follows: $X(u) = A_x+B_x \times u+C_x \times u^2+D_x\times u^3$ $Y(u) = A_y+B_y \times u+C_y \times u^2+D_y\times u^3$ $u:[0,1]$ In ...
1
vote
0answers
11 views

Roots/zero crossing of additive piecewise linear splines

Suppose we have a function $f$ in p-variables $x_1,...,x_p$ which has the form $f(x_1,...,x_p) = f_1(x_1)+...+f_p(x_p)$. Assume further that each function $f_p$ is a piecewise linear spline. What I ...
1
vote
0answers
21 views

Is Catmull–Clark subdivision surface a refinement scheme?

To do the knot refinement, one important thing is to not change the geometry. Also, it is done in the parametric domain. However, for Catmull–Clark subdivision surface, it is done on the physical ...
1
vote
0answers
32 views

Should a natural cubic spline ensure 3rd derivative on the boundary to be 0?

Say we have K interior knots (t_1 to t_K). We can form K + 1 piecewice polynomials. If we want to fit a natural cubic spline s(x) In regression, we would enforce ...
1
vote
0answers
12 views

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]...
1
vote
0answers
25 views

Catmull-Rom intersection at a given X

I'm using centripetal Catmull-Rom to interpolate keyframe values for animation. Each keyframe represents an animation time $x$ and a channel value $y$. I am trying to write a function that is ...
1
vote
0answers
22 views

How to take the partial derivative of a line integral where the line is a B-spline contour in a 2D image?

Short Version How do I apply this partial derivative to a line integral along a contour in an image? The contour is a B-spline and the term I am trying to resolve is below. The detailing of each part ...
1
vote
0answers
16 views

What does a spline transformation do?

I'm not a mathematician and new to splines. I'm searching to understand basics of spline transformations in a practical way (i.e. by example). Does anyone know a good place to begin?
1
vote
0answers
24 views

Trajectory interpolation with known coordinates and heading angles.

I have a set of $n$ tuples $(t_i,x_i,y_i,r_i)$ for $i \in \{0,...,n\}$, where $t_i$ is a timestamp, $x_i$ and $y_i$ location coordinates and $r_i$ a heading angle of a moving object in 2D space. Note ...
1
vote
0answers
26 views

least square approximation in spline space

I am confused about how to obtain the least squares estimator of this problem: $$ \inf\{||s-\lambda||_2:s\in S_{k,v}\}=||P_k\lambda-\lambda||_2\tag{1} $$ where $||\lambda||_2=\{\int_0^1\lambda^2(x)dx\}...
1
vote
0answers
68 views

Why is the closed-form evaluation of the Catmull-Rom spline numerically unstable?

According to the related Wikipedia article, a cubic Hermite spline, on the unit interval $[0, 1]$, is defined as $$ \mathbf{p}(t) = (2t^3-3t^2+1)\mathbf{p}_0 + (t^3-2t^2+t)\mathbf{m}_0 + (-2t^3+3t^2)\...
1
vote
0answers
27 views

Flexible grid update algorithm

I have a 2D square grid where the edges are line segments and the vertices have moved from their initial positions. Based on external constraints, the vertices are submitted to further motion, under ...
1
vote
0answers
104 views

Cubic runout spline (cubic spline)

I was studying cubic spline interpolation and then I stumbled upon "Cubic runout spline". The idea behind it is that you set the boundary conditions for second derivatives to be: $f_1''(x_0) = 2f_1''(...
1
vote
0answers
140 views

Convergence Rate of Smoothing Splines

Consider the regression model with data $(Y_i, x_i)_{i=1}^{n}$ (i.e. real-valued target and univariate predictor $x_i$) $$ Y_i = f(x_i) + \epsilon $$ with $\epsilon$ iid, $E(\epsilon) = 0$ and $\...
1
vote
1answer
318 views

Relation between a Bezier curve and B-Spline curve

While the ideas behind Bezier curves are rather straight forward, I'm really struggling trying to understand B-Splines. I really researched quite a lot about it and still can't figure it out. I ...
1
vote
0answers
50 views

Approximate a ($y²-x²=1$) hyperbola with line segments and elliptic ($a(x-x_0)²+b(y-y_0)²=1$) arcs

On some IT graphic systems, you have tools which draw line segments and circle or elipse arcs, but which do not draw parabolas or hyperbolas, and in many cases, those system keep track of graphical ...
1
vote
2answers
127 views

“fastest” curve through n points

I'm programming an AI for a race game, where my car has to drive through some checkpoints. If I let it drive straight in direction of the checkpoints, it has to slow down and make a huge turn after ...
1
vote
0answers
62 views

Monotonic and smooth interpolation between three points

The problem I have is the following: Given three $x,y$ points, $(-1, -y_{0})$, $(0,0)$ and $(1,y_{2})$, where $y_{0} \geq 0$ and $y_2 \geq 0$, I want to interpolate smoothly between them with a ...
1
vote
0answers
150 views

How to calculate smoothing spline coefficients

I am attempting to calculate smoothing spline coefficients based on the description in Reinsch's 1967 paper, but I'm having some trouble. The first derivative is not continuous. Here are the ...
1
vote
0answers
116 views

Convert multiple Bézier segments to a nurbs curve

I have multiple cubic Bézier curve segments which are contiguous and G1 (they are the result of the fitting of many curve samples). Now I would like to transform these Bézier segments into a single ...
1
vote
0answers
30 views

Iterated backward difference quotient from splines

I am working on a certain problem: say we have a function $f$ defined on an interval $[a,b]$ and we want the spline $Sf$ of order $k$ (and knots needed for the B-splines are in $[a,b]$) to agree to $f$...
1
vote
1answer
2k views

The advantage of B-spline compared to Bézier if the number of control points is very small

If the number of control points is n+1, and the degree of the basis function is p If n = p, B-spline is as same as Bézier curve. Suppose I have a chance to increase the number of control points say ...
1
vote
2answers
444 views

What is the purpose of having repeated knots in a B spline?

A primer on the cpr package in R (page 2 of https://arxiv.org/pdf/1705.04756.pdf) writes the following about B-splines. A B-spline basis matrix is defined by a polynomial order $k$ and knot ...
1
vote
0answers
38 views

Meaning of k-th divided differences.

The $k$-th divided difference of a function $g$ at sites $\tau_i,\ldots, \tau_{i+k}$ is the leading coefficient (that is, the coefficient of $x^k$) of the polynomial of order $k+1$ that agrees with $g$...
1
vote
0answers
24 views

How to compute the quadric form matrix of the B-spline norm $\int_{k_1}^{k_n}f(t)^2dt$?

Let $f:[k_1,k_n]\to\mathbb{R}$ be a degree $d$ B-spline function with real knots $\{k_1,\ \ldots\ ,\ k_n\}$ and real coefficients $\{c_1,\ \ldots\ ,c_{n-d-1}\}$. The norm $\ \int_{k_1}^{k_n}f(t)^2dt\ ...