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
1
vote
1answer
140 views

Interpolating a three point curve at any angle using cubic splines

I'm trying to interpolate a curve using cubic splines and three points in the x-y plane. I have some troubles finding the equation for the middle point such that the normal vectors in point P0 is ...
1
vote
1answer
72 views

conic arc function

I would like to have a function $f(x,\alpha)$ looking like this: The lower the line, the bigger $\alpha$ is The straight line in the middle correspond to $\alpha=0$ The line forming the upper left ...
1
vote
1answer
1k views

Cubic Hermite spline Derivative

I’m using the cubic Hermite spline to interpolate the position of a body as a function of time, here’s the formula: https://en.wikipedia.org/wiki/Cubic_Hermite_spline#...
1
vote
1answer
72 views

How to draw a spline curve?

Well, I know this definition of a spline curve : $\forall t \in [0 ; 1], C(t) = \sum\limits_{i=1}^{k}F_i(t)P_i$ With : $t$ the abscissa of the spline curve's point we want to draw $C$ the function ...
2
votes
1answer
475 views

Draw cubic polynomial using 2D cubic Bezier curve

I have a cubic polynomial : $f(x) = ax^3 + bx^2 + cx + d$, where $ a, b, c$ and $d$ are known values. The graph of the function goes through points $(x_0, y_0)$ and $(x_1, y_1)$. Also $x_1 > ...
1
vote
0answers
46 views

Derivative of a function using the fitted curve

I have a set of numerical functions (f(x), g(x), h(x)) that can be evaluated at any point. f, g, and h are smooth functions (i.e. no jumps etc). I would like to take the derivative of $$ d(f(x)/(...
1
vote
0answers
91 views

Approximation with stability constant 1

I am looking for an approximation method for a typical 1-dimensional approximation problem, that has stability constant 1. The setting We have an interval $[a,b]$ an unknown function $f$ on $[a,b]$ ...
1
vote
0answers
69 views

calculating the area of 3D NURBS

for a given 3D NURBS, for example the roof below: architectural use of NURBS how can the area of 3D NURBS be calculated?
2
votes
1answer
70 views

Elevation of the degree of a Bézier spline.

If I have a Bézier spline of degree 3 (points $P_{000}$ ->$P_{111}$, and I want to elevate up to degree 6 $Q_{000\,000}$ -> $Q_{111\,111}$. I could do this by calculating the weight of each point $P$ ...
1
vote
1answer
165 views

Making a B-spline curve interpolate through a control point

In some course it's said that a B-spline curve can be made to interpolate through one of its control points by increasing the multiplicity of a knot to n+1 (n being the degree of the curve). This can ...
1
vote
1answer
39 views

Fitting a quadratic interpolant to $y = cos x$ at three nodes

Lets say we want quadratic interpolation of $y = cos x$ at the nodes $\{0, \pi/2, \pi\}$. And we would like to match the derivative of $y(x)$ at the center node. We will get two interpolants, lets ...
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) ...
1
vote
0answers
173 views

Angle between a spline point and the tangent to the previous point on spline

I have spline points represented as geographical points (latitude,longitude) and I want to compute the angle between the current spline point and the tangent to the previous spline point.
1
vote
1answer
1k views

B-spline curve fitting

I am trying to do curve fitting with b-splines. Searching on the internet, i found that a simply could use least square fit, $$E = \frac{1}{2} \sum_{k=0}^m |C(t_k) - X_k|^2$$ where $C$ is the b-...
1
vote
0answers
65 views

Representation of polar forms corresponding to b-splines

Divided differences and polar forms are two elegant tools for the representation of b-splines. I observed the following connection between both tools. But, since I didn't find it in the literature yet ...
1
vote
0answers
51 views

B-spline curve is not satisfying partition of Unity property at the beginning and end

At the beginning and end, the curve goes to zero The following is the matlab code ...
1
vote
0answers
98 views

Cubic splines with Lagrange Multipliers

I have some trouble with this problem: Consider that you have the following data $(x_i ,y_i)$ for $I=1...m$, where $0 \leq x_i \leq L$ How could you build a cubic spline defined in the following ...
1
vote
0answers
139 views

How can I make sure that a line and spline join smoothly (C2 continuity)?

I have a sequence of geometric items that I need to join smoothly to create a smooth path. When points are far enough apart, they will be joined by a straight line. When they are too close together, ...
1
vote
0answers
140 views

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}...
1
vote
2answers
2k views

Interpolating splines with 3d points

I want to figure out how to calculate a cubic spline using 3d points. The wiki page shows a good example for 2d points but I just cannot find any resources that would let me do it with a 3d point aka ...
1
vote
1answer
1k views

How to to generate Hermite interpolating polynomials?

How is it possible to generate Hermite interpolating polynomial (spline) with an arbitrary degree which interpolates between $x_0$ and $x_1$ and also between the their first $((k-1)/2)$-th derivatives ...
1
vote
2answers
251 views

Is a B-spline curve uniquely defined by one set of coefficients?

Let $C(u)$ be a B-spline curve of fixed degree $p$ depending on the parameter $u\in[0,1]$ $C(u) = \sum_{i=0}^n c_i \, B_i(u)$ with $n+1$ coefficients $\{c_i\}$ and basis functions $\{B_i(u)\}$ of ...
1
vote
1answer
167 views

Function interpolation / approximation of function given by points only

I am wondering how can I calculate the error of an interpolation (Lagrange, Newton, spline) or approximation (trigonometric) for a function whose mathematical expression I don't know, but I have some ...
1
vote
2answers
153 views

Representing lower order B-Splines as higher order B-splines

I have tried to figure out how B-splines of degree $p - 1$ can be represented as linear combinations of B-splines of degree $p$. Definitions: Given a set of increasing real values $t = (t_i)_{i = 1}^...
2
votes
2answers
920 views

Cubic splines with endpoint conditions in only one endpoint?

It seems that when using cubic splines the most common thing to do is to specify that the first (or second) derivatives at the left and rightmost points equal prescribed numbers. I have never seen ...
1
vote
1answer
307 views

What is the difference between a B-spline surface interpolation and a skinning surface?

I am working through The NURBS Book and I have come across two types of surface interpolations for my data: 1) Global Interpolation of data with a B-spline surface, and 2) Skinning surface (makes a ...
2
votes
2answers
207 views

A basis for space of spline of degree k

how can i proof space of spline of degree k on $[x_0,x_n]$ with knots: $$x_0<x_1<\cdots<x_{n-1}<x_n,$$ have a basis like this: $$\{1,x,x^2,\ldots,x^k,(x-x_1)^k_+,(x-x_2)^k_+,\ldots,(x-x_{n-...
2
votes
2answers
814 views

How to make a closed interpolating B-spline smooth at the joining point.

I have implemented an algorithm to interpolate a set of points with a B-spline curve. The algorithm is from The NURBS Book. Given a set $Q$ of data points, the interpolating algorithm gives us a ...
1
vote
0answers
30 views

How are the functions for rational motion defined?

I'm trying to implement a program using C++ that could determine a B-spline curve which would represent rational motion between given control positions (following along with Juttler and Wagner's ...
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 ...
1
vote
1answer
187 views

How to determine set of functions including piecewise functions are linearly independent?

While working on trying to understand why $$ \begin{align*} p_1(x)&=1\\ p_2(x)&=x\\ p_3(x)&=x^2\\ p_4(x)&=x^3\\ p_5(x)&=[x-\zeta_1]_+^3\\ p_6(x)&=[x-\...
1
vote
0answers
76 views

How to find the first and last point of the clamped spline?

I want to draw a clamped spline. How to calculate the first and last value?. I got the algorithm from below link http://www.physics.arizona.edu/~restrepo/475A/Notes/sourcea-/node35.html They did ...
1
vote
2answers
1k views

How to calculate the cubic Bézier spline points?

I want to draw a Bézier curve.I have four points are p0,p1,p2,p3. Draw the curve from P0 to P1, it is the start and end point of the curve. How to calculate the intermediate point to draw curve? I ...
1
vote
1answer
123 views

Global curve interpolation with end derivatives specified (setting up the matrix equation).

I am working through The NURBS Book. Example 9.1 shows us how to interpolate the points $$\{Q_k\} = \{(0,0),(3,4),(-1,4),(-4,0),(-4,-3)\}$$ with a cubic B-spline curve. Using the chord length method ...
1
vote
0answers
34 views

Why spline interpolate by repeating p+1 knots?

By repeating $p+1$ knots in spline, we can let a spline interpolate in a point. This is true but I don't understand why it happens for $p+1$ knots? If I can find somewhere a proof or someone can give ...
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 ...
1
vote
0answers
36 views

2D Interpolation Identification Help

I'm trying to identify an interpolation used. Can anyone help? I'm trying to figure out what the algorithm is doing. It basically has two interpolation parameters (PreviousMovementStepValue and ...
1
vote
1answer
413 views

Natural Spline - Determining Coefficient

A practice problem (not homework/assignment). Given a natural spline S(x) where a1 + 25x + 9x^2 + x^3 where x is [-3, -1] 26 + a2x + a3x^2 - x^3 where x is [-1, 0] 26 + 19x + a4x^2 + a5x^3 where ...
1
vote
1answer
374 views

Clamped B-spline curves

This is not a question about research , i am trying to create B-Spline curves but i don't understand how can i generate a clamped B-spline?More precisely the knots are fixed($m = n + p + 1$) , how can ...
3
votes
1answer
752 views

Unique Cubic Polynomial Hermite Interpolation.

A practice problem from my textbook (not homework/assignment). Show that there is a unique polynomial $P_{3}(x)$ where $p_{3}(x_{0}) = f(x_{0}),\space p_{3}(x_{2}) = f(x_{2}), p'_{3}(x_{1}) = f'(...
2
votes
1answer
104 views

Cubic Spline: Prove S(3/2) = (3/2)^3

Let S(x) be the not-a-knot cubic spline interpolant of the points (0, 0), (1, 1), (2, 8), and (3, 27). Explain why $S(3/2) = (3/2)^3$ .
2
votes
1answer
3k views

How to calculate a spline's length from its control points and knots vector

I'm working in a C# program that reads *.dxf files and calculates each entity's length. At this moment I can get almost all entities' lengths except for the spline. After reading the document, I get ...
1
vote
1answer
39 views

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 ...
2
votes
1answer
992 views

What is the second derivative of a B-spline?

A B-spline of degree $j$ is defined at knots $\vec k$ by the Cox-de Boor recursion formula \begin{align} B_{i,1}(x) &= \left\{ \begin{matrix} 1 & \mathrm{if} \quad ...
1
vote
1answer
91 views

Linear regression of B-splines with terms inside an integral?

I have encountered a problem that the literature suggests linear regression is able to solve, but I am at a loss. I have a function $F$ that I want to estimate. This function obeys $N$ equations of ...
1
vote
2answers
135 views

Polynomial regression with penalty for non-smoothness

I am looking for a solution to the following curve fitting problem. Given a sample of data points $\{ (x_i, y_i)_{i=1}^n \}$: $$\underset{f}{\arg\min} \sum_{i=1}^n (y_i - f(x_i))^2 + \lambda \int_{...
1
vote
0answers
34 views

Properties of B-splines

I have read that B-splines in multiple dimensions are separable which makes them computationally efficient. What does this mean?
1
vote
1answer
74 views

Connecting points with a spline based on a logarithmic spiral

Suppose I have two points $\vec p_1$ and $\vec p_2$. How can I calculate the equation for the logarithmic spiral that passes through $\vec p_1$ at an angle of $\theta_1$ and through $\vec p_2$ at an ...
1
vote
0answers
151 views

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 ...
2
votes
1answer
4k views

Find the not-a-knot cubic spline over each subinterval in standard form

Looking over some cubic spline interpolation problems and unsure which method to use. Given the values: x= [-2,-1,0,1,2,3], y = [18,12,6,4,5,18] respectively. So x(-2) = 18, x(-1) = 12, x(0) = 6, x(...

1
3 4
5
6 7
11