We’re rewarding the question askers & reputations are being recalculated! Read more.

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.

Filter by
Sorted by
Tagged with
0
votes
0answers
10 views

How to build a cubic spline with boundaries?

I have a problem with a fit of a certain path. For a better understanding I created picture: Visualization of my problem In short: What I have is the yellow f(x), what I want is the blue g(x). ...
-1
votes
0answers
11 views

Difference between interpolation of Nd curve and multivariate interpolation

I am working on interpolating a track in 2 dimensions (x,y) as a function of time t. My question is can I simply perform two separate interpolations (x,t) and (y,t) and consider the the resulting (x,y)...
0
votes
0answers
20 views

Spline interpolation of time-series respecting the zeros. Which technique is the best?

I'm dealing with time-series which consist of discrete measurements of a continuous signal: ...
19
votes
2answers
13k views

What is the relationship between cubic B-splines and cubic splines?

What is the relationship between cubic B-splines and cubic splines?
0
votes
0answers
18 views

clamped cubic spline in Matlab

The question is to use Matlab to find the clamped cubic spline $v(x)$ that interpolates a function f(x) that satisfies: $f(0)=0, f(1)=0.5, f(2)=2, f(3)=1.5, f'(0)=0.2, f'(3)=-1$ and then plot $v(x)$. ...
0
votes
0answers
8 views

Approximation subject to derivative constraints, textbook reference?

I'm looking for a reference (preferably a textbook treatment) that can help me answer the following question. Suppose $\mathcal{F}$ is a space of functions on a subset of $\mathbb{R}^d$ with ...
0
votes
0answers
5 views

function for which natural cubic spline and spline 'without node' are the same thing

If we're talking about cubic splines, is there a function (are there functions) for which natural spline and spline 'without node' are the same thing? If yes, please give me an example (examples), if ...
0
votes
0answers
8 views

Difference in DOF from a cubic spline to a natural cubic spline?

enter image description here I am curious as to what the answer on this question is? My thought process is that the answer should be 4 DOF for the new natural cubic spline model. Below is how I ...
0
votes
1answer
20 views

Find continuous curvature approximation for going from a straight line into a half circle

I have the problem that I want to steer a 4 wheel robot. It should move on a straight line, and for turning to go on a circle with a defined radius, as in this picture: The problem I have is that if ...
0
votes
0answers
25 views

Understanding Global Curve Approximation

Foreword StackOverflow referred me here, because my questions seems to be more related to math, than to algorithms. You can see the original question here: https://stackoverflow.com/questions/...
0
votes
0answers
16 views

Does not-a-knot cubic spline interpolation always have a tridiagonal system of equations when solving for the second derivatives?

I've been looking at the question Not-a-knot cubic spline interpolation using tridiagonal solver, for much the same reasons as the original asker - to figure out how to implement not-a-knot spline ...
0
votes
0answers
7 views

Bibliography for cubic B-spline expansion to approximate functions

I'm currently working on obtaining the deuteron wavefunction with a specific potential (OPEP) and it involves solving a system of two coupled second order differential equations. I was told to use ...
0
votes
0answers
20 views

Minimizing cost function of curvature for quality control of weather observations

My question pertains to the implementation of the quality control of spatially distributed weather data in the following study: https://journals.ametsoc.org/doi/full/10.1175/MWR-D-10-05024.1. I will ...
0
votes
0answers
13 views

Determining closest (smoothed) point on a spline

I have a spline defined by a list of Vector3. I have an object that roughly follows the path defined by the spline [but drifts to either side], and I have a goal that precedes the object by n points. ...
0
votes
0answers
7 views

Evaluating basis splines at the knots

Given an order $k$ and a set of knots $\{t_m\}$, we can define the basis splines as done here, where $B_{i,k}$ denotes the $i^{th}$ basis spline of order $k$. I have written a simple script that ...
0
votes
1answer
69 views

Normal of Catmull-Rom Spline

I've implemented Catmull-Rom in python and now I want to be able to get the normal of points so I'm first finding the tangent, to look something like this. For Catmull Rom I have 4 points P0, P1, P2 ...
0
votes
1answer
16 views

Prove $S_{m}^{m}(\Delta)$={$s:s\in C^{m}[a,b]$ and $s$ is a polynomial of order $m$ in each $[x_{i},x_{i+1}]$}=$P_{m}$

Basically, I don't understand clearly. The point is to prove that these two spaces are equal or that the polynomial $s \in S_{m}^{m}(\Delta)$ is unique/the same in each $[x_{i},x_{i+1}]$? where $(\...
1
vote
1answer
1k 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 ...
0
votes
0answers
10 views

Localized spherical harmonics - in analogy to wavelets or orthogonal cyclic cubic spline

Cyclic Cubic Spline provides orthogonal yet maximally localized basis to decompose periodic function in 1D (i.e. defined on circumference of a circle). It combines good aspect of Fourier basis (cos,...
0
votes
2answers
44 views

What is the importance and effect of the smoothness of a spline?

A Catmull-Rom spline is a $C^1$ (but not $C^2$) function, that is, its first derivative is continuous (but its second derivative might not be). However, there are splines that have $C^2$ or, in ...
0
votes
0answers
20 views

How is the recursive evaluation algorithm for Catmull-Rom splines with non-uniform parametrization related to the original formulation?

In the paper A Recursive Evaluation Algorithm for a Class of Catmull-Rom Splines, Barry and Goldman proposed a recursive algorithm to evaluate or calculate the Catmull-Rom spline between two control ...
3
votes
2answers
4k views

How can I calculate the derivative of a Catmull-Rom spline with nonuniform parameterization?

Allow me to preface this by saying I am not a trained mathematician in any sense, so it's entirely possible I'm missing something rather fundamental. That said, I'm trying to take the derivative of a ...
5
votes
1answer
889 views

What is the difference between cubic splines and cubic b-splines? [duplicate]

I am dealing with a numerical problem with cubic spline, but I am a little bit confused while using them because of terms spline and b-spline. In simple words, what is the difference between the ...
5
votes
1answer
29 views

Methods for spline fitting for transcendental functions? How to place the knots?

I was thinking about the following problem the other day: Fit a spline $s(t)$ to some transcendental function $f(t)$, so that: $$s(t) = \cases{P_k(t), \text{ if } t_k \leq t \leq t_{k+1}}$$ For ...
0
votes
0answers
26 views

How are the tangents at the control points approximated in a Catmull-Rom spline?

The Wikipedia article related to cubic Hermite splines states that, assuming a uniform parameter spacing (that is, $|t_{i+1} - t_i| = c \in \mathbb{R}, \forall i$), the tangent at the control point $\...
1
vote
0answers
41 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)\...
0
votes
0answers
21 views

Problem in calculating the derivative of a cost function

I'm implementing a non rigid image registration using B-Splines and I'm trying to find the minimum of the Sum of the Squared Differences (SSD). For this, I need to find the derivative of the SSD ...
0
votes
0answers
20 views

Understanding Spline Space

Let $$ S_{\Delta,l}:=\{s \in C^{l-1}[a,b]:s|_{[x_k,x_{k+1}]}=p_k|_{[x_k,x_{k+1}]} , p_k \in \Pi_l (k=0,...,m-1)]\} $$ with $l\in \mathbb{N}, \Delta:=\{x_i|a:=x_0<x_1<...<x_m=:b\}$ Regarding ...
1
vote
2answers
510 views

Difference between bezier segment and b-spline

i am currently learning about bezier curves and splines in computergraphics. Where is the difference between a b-spline curve and a curve that consists bezier curves as segments. I have read in a lot ...
0
votes
0answers
37 views

how to express the cubic spline tangent vector in the xy coordinate

I'm using piece=wise cubic spline to interpolate $2$-D data. For a given segment, I have the following reparameterization $$ x(t) = a_0 + a_1(t-t_0) + a_2(t-t_0)^2 + a_3(t-t_0)^3,$$$$ y(t) = b_0 + b_1(...
0
votes
1answer
12 views

How to create a Cubic Hermite Spline interpolation equation?

I am developing a program for which I need to smoothly interpolate between some control points. Here is an example of what I need. Ie. In this gif, the knob is crossfading between no interpolation at ...
1
vote
1answer
529 views

Estimating the curvature of a discretized curve in 3d with cubic splines

I have a computer simulation in which I'm modeling a physical curve by discretizing it and updating the locations of these points. I want to find/estimate the location of the maximum curvature of the ...
2
votes
2answers
1k views

What's the best way to calculate all of the points for a curve given only a few points?

I've been reading up on curves, polynomials, splines, knots, etc., and I could definitely use some help. (I'm writing open source code, if that makes a difference.) Given two end points and any ...
0
votes
1answer
8 views

Determining polynomial coefficients for a Catmull-Rom Hermite spline?

In a quantitative finance textbook I am using, Catmull-Rom splines are presented as follows: $$\begin{align} y(x)&=\mathbf{D}_i(x)^\intercal\mathbf{A}_i\begin{pmatrix}y_{i-1}\\y_i\\y_{i+1}\\y_{i+...
0
votes
0answers
32 views

How to center B-spline basis function around zero?

I am having a seemingly easy question as what follows. Suppose I am estimating a smooth function $f(x_i)$, with $i=1,...,n$ and $n$ is the sample size. Now, if I have the restriction on $f(\cdot)$ ...
4
votes
2answers
2k views

Approximating a large number of data points using (cubic) splines in l1/l2 norm.

I have a pretty large dataset ($x,y$) consisting of a few million points. There is a lot of noise in the data. I want to find a smooth but simple approximation/representation for this dataset, so that ...
11
votes
2answers
28k views

How to calculate interpolating splines in 3D space?

I'm trying to model a smooth path between several control points in three dimensions, the problem is that there doesn't appear to be an explanation on how to use splines to achieve this. Are splines a ...
0
votes
0answers
23 views

Cardinal B-spline: Convolutional definition to recurrence

Define $$ B_{0}(x) := \begin{cases} 1, &|x| \le 1/2, \\ 0, &|x| > 1/2 \end{cases} $$ Then define the rest of the cardinal $B$-splines via iterative convolution, so that $$ B_{n+1} := B_{n}\...
0
votes
0answers
22 views

Parametric vs non-parametric transformations

I am currently concerning myself with transformations (mainly of images). However, I am not quite clear on the difference between parametric and non-parametric transformations. From my current ...
1
vote
1answer
52 views

Natural linear spline function representation

Let $s: \mathbb{R} \to \mathbb{R}$ be a natural spline function of degree one (that is it is piecewise a polynomial of degree at most 1) and let $x_0 \leq x_1 \leq ...\leq x_n$. Show that $s$ can be ...
23
votes
11answers
5k views

What equation produces this curve?

I'm working on an engineering project, and I'd like to be able to input an equation into my CAD software, rather than drawing a spline. The spline is pretty simple - a gentle curve which begins and ...
0
votes
0answers
31 views

Confusion on the formula of Rational Bezier curve in Duncan's book

Duncan Marsh's book Applied Geometry for Computer Graphics and CAD stated I'm really confused about this formula. First of all, why do we replace $w_i\mathbf{b_i}$ with $\mathbf{b_i}$ when $w_i=0$? ...
0
votes
0answers
44 views

Proof of equivalence between integral cost of homogenous form of NURBS curve and it's projection

The context of my problem: I'm trying to implement an optimization problem in MATLAB using YALMIP. The objective function computes the integral cost of the squared norm of the derivative of my NURBS-...
0
votes
1answer
36 views

How to scale a catmull-rom spline

I have a catmull-rom spline represented by its end vertices plus control points. I would like to be able to scale it so that it can be resized/stretched/squeezed in a way that looks linear. However, ...
0
votes
1answer
67 views

B-Spline basis function partition of unity

I'm struggling to prove the partition of unity property for B-spline basis functions, which states that $$\sum_{i=r-p}^rN_{i,p}(\xi)=1$$, $\xi\in[\xi_r,\xi{r+1})$, where $p$ is the degree. I know that ...
0
votes
0answers
29 views

straight line intersection with centripetal catmull-rom: writing spline in cubic form

I'm a biologist rather than a mathematician so apologies if my definitions might be a bit off. I'm trying to find the intersection of a straight line (the normal of one of my catmull-rom curves) with ...
0
votes
1answer
45 views

How to solve this 4x4 equation system for a cubic spline?

I am attempting to create a simple cubic spline between these lines: I have worked out the four equations as: (1) $1 = An^3 + Bn^2 + Cn + D$ (2) $g^{m-t} = At^3 + Bt^2 + Ct + D$ (3) $0 = 3An^2 + 2Bn ...
0
votes
0answers
19 views

How to create a cubic spline between the lines x=0 and y=1?

I am trying to create a simple cubic spline from points (0,0) to (m,1) connecting the lines y=1 and x=0. However, I am having trouble getting the spline to be tangential to the x=0 line at (0,0). ...
4
votes
1answer
2k views

How do I find the outline resulting from the intersection of a NURBS surface and a plane?

The context for this question is 3D printing. Currently the way it's done is: Convert a 3D model to a mesh of triangles Ensure it's manifold and that there are no degenerate triangles 'Slice' this ...