I trying to work out how to interpolate on a grid with cubic splines. Let the point at which I'm trying to interpolate be at {xp,yp}. At the moment I am fitting splines across the rows and then interpolating along these splines at xp. I then have a set of interpolated values (one for each row) which I can fit another vertical spline through and evaluate at yp. Now my trouble is that each such evaluation requires another spline to be fitted (I can save the horizontal splines). Is there a quicker way to do this that would ensure C^2? Some way of averaging spline coefficients? Please help.
2026-03-26 19:04:00.1774551840
Cubic splines on a grid
941 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
1
There are 1 best solutions below
Related Questions in APPROXIMATION
- Does approximation usually exclude equality?
- Approximate spline equation with Wolfram Mathematica
- Solving Equation with Euler's Number
- Approximate derivative in midpoint rule error with notation of Big O
- An inequality involving $\int_0^{\frac{\pi}{2}}\sqrt{\sin x}\:dx $
- On the rate of convergence of the central limit theorem
- Is there any exponential function that can approximate $\frac{1}{x}$?
- Gamma distribution to normal approximation
- Product and Quotient Rule proof using linearisation
- Best approximation of a function out of a closed subset
Related Questions in INTERPOLATION
- Almost locality of cubic spline interpolation
- Reverse Riesz-Thorin inequality
- How to construct a B-spline from nodal point in Matlab?
- Show that there is a unique polynomial of degree at most $2n+1$ such that $q^{[k]}(x_1)=a_k,$ $q^{[k]}(x_2)=b_k$ for $k=0, \dots, n$.
- Show that there is a unique polynomial of degree at most $2k+1$ such that $p^{[j]}(x_1)=a_j \text{ and } p^{[j]}(x_2)=b_j \text{ for } j=0,\dots, k.$
- How to find x intercept for a polynomial regression curve(order 7)
- Quadrature rules estimation
- How to obtain generalized barycentric coordinates for n-sided polygon?
- the highest degree of the polynomial, for which the above formula is exact?
- Interpolation method that gives the least arc lenght of the curve.
Related Questions in SPLINE
- Approximate spline equation with Wolfram Mathematica
- Almost locality of cubic spline interpolation
- inhomogeneous coordinates to homogeneous coordinates
- Can the relocation of one control point of a NURBS curve be compensated by an adjustment of some weights?
- How to construct a B-spline from nodal point in Matlab?
- Evaluation the interpolation polynomial at $x$
- Book suggestions on B-spline method for solving differential equations
- C2 continuous Bezier contour.
- Formula for the partial derivative of a bivariate tensor-product spline on a grid of points
- Integral of two zero-order spline basis functions
Trending Questions
- Induction on the number of equations
- How to convince a math teacher of this simple and obvious fact?
- Find $E[XY|Y+Z=1 ]$
- Refuting the Anti-Cantor Cranks
- What are imaginary numbers?
- Determine the adjoint of $\tilde Q(x)$ for $\tilde Q(x)u:=(Qu)(x)$ where $Q:U→L^2(Ω,ℝ^d$ is a Hilbert-Schmidt operator and $U$ is a Hilbert space
- Why does this innovative method of subtraction from a third grader always work?
- How do we know that the number $1$ is not equal to the number $-1$?
- What are the Implications of having VΩ as a model for a theory?
- Defining a Galois Field based on primitive element versus polynomial?
- Can't find the relationship between two columns of numbers. Please Help
- Is computer science a branch of mathematics?
- Is there a bijection of $\mathbb{R}^n$ with itself such that the forward map is connected but the inverse is not?
- Identification of a quadrilateral as a trapezoid, rectangle, or square
- Generator of inertia group in function field extension
Popular # Hahtags
second-order-logic
numerical-methods
puzzle
logic
probability
number-theory
winding-number
real-analysis
integration
calculus
complex-analysis
sequences-and-series
proof-writing
set-theory
functions
homotopy-theory
elementary-number-theory
ordinary-differential-equations
circles
derivatives
game-theory
definite-integrals
elementary-set-theory
limits
multivariable-calculus
geometry
algebraic-number-theory
proof-verification
partial-derivative
algebra-precalculus
Popular Questions
- What is the integral of 1/x?
- How many squares actually ARE in this picture? Is this a trick question with no right answer?
- Is a matrix multiplied with its transpose something special?
- What is the difference between independent and mutually exclusive events?
- Visually stunning math concepts which are easy to explain
- taylor series of $\ln(1+x)$?
- How to tell if a set of vectors spans a space?
- Calculus question taking derivative to find horizontal tangent line
- How to determine if a function is one-to-one?
- Determine if vectors are linearly independent
- What does it mean to have a determinant equal to zero?
- Is this Batman equation for real?
- How to find perpendicular vector to another vector?
- How to find mean and median from histogram
- How many sides does a circle have?
The usual way to get good performance is is to store enough information about the spline, so that evaluation can be a simple local calculation. You certainly don't want to recalculate the spline coefficients every time you want to calculate a point.
So, in the curve case, the spline calculation gives you the first derivative at each data point, and you store these derivatives. Then, when you need to calculate a point on the spline, it's easy: you figure out which segment it lies on, you retrieve the points and first derivatives at the end-points of this segment, and do a simple Hermite cubic interpolation.
Alternatively, you can compute and store the b-spline coefficients of the curve, and use these to evaluate points. In the case of $C_2$ curves, the b-spline coeffients will occupy roughly 50% less space (compared to the "Hermite" approach of storing points and first derivatives).
Now, on to the surface case ...
The principle is the same -- after computing the surface, store enough information to make subsequent evaluations easy. There is a direct analog of the Hermite scheme for curves outlined above. At each data point $(x_i, y_j)$ you compute and store $$ S(x_i, y_j) \quad ; \quad \frac{\partial S}{\partial x}(x_i, y_j) \quad ; \quad \frac{\partial S}{\partial y}(x_i, y_j) \quad ; \quad \frac{\partial^2 S}{\partial x \partial y}(x_i, y_j) $$ The computation is done by separately "splining" in the $x$ and $y$ directions. It sounds like you know how to do this, so I won't go into details unless you ask. Then, to compute the surface value at given coordinates $(x,y)$, you proceed as follows. First, find out which "patch" the given point lies in. In other words, find indices $i$ and $j$ such that $x_i \le x \le x_{i+1}$ and $y_j \le y \le y_{j+1}$. Then retrieve the four pieces of stored data at the four corners $(x_i,y_j)$, $(x_i,y_{j+1})$, $(x_{i+1},y_j)$, $(x_{i+1},y_{j+1})$ of this patch. You now have 16 pieces of data that will allow you to do a simple Hermite bicubic patch calculation to get $S(x,y)$, as explained on page 9 of these notes.
As in the curve case, you can compute and store b-spline coefficients rather than partial derivatives, and this will give you a roughly 4x reduction in data.