- Choose a knot sequence for the spline.
- Calculate the B-spline basis functions based on the knots sequence.
- Find the tensor product of the basis functions to get the function for the surface of the bivariate spline.
how are obtain the coefs in a bivariate 2nd orden ppform spline?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
hello everyone!. I would like to ask a question regarding the piecewise polynomial splines that matlab uses (ppform). it is more a concern that I dont fully understand the mathematics behind it. More specifically, talking about the coefficients in multivariate ppform splines.
When dealing with univariate I know that this coefficients follow a simple algorythm of :
for a k order spline, at the j piece, and it'scorresponding breakpoint. Coefs here are stored according to the Cij values.
But, when using multivariate splines, the coefs are calculated by a tensor product, and here is where my mind get lost. I have tried the following in order to simplify things and try to understand what is really doing:
[xx,yy] = meshgrid(0:1); %create the grid
z = xx+yy; % Just a simple add function
korder = {2,2}; % 2nd order splines in both axes
x = 0:1; y = 0:1;
knots = {x,y};
s = spapi(korder,knots,z); %create the B-form spline
g = fn2fm(s,'pp'); %transform into ppform
mesh(x,y,z) %visualization of the z surface
A = reshape(g.coefs,2,2); %clear visualization of coefs
So just a simple square, with the borders unite by lines.
My question is: How do I obtain this coefficients? What is the mathematical system to obtain them? I need to obtain them by hand in order to fully understand everything
Any pointer to an specific bibliography that can help would be appreciated as well. Thank you so much !
0 Commenti
Risposte (1)
Avadhoot
il 17 Gen 2024
Hi Jaime,
I understand that you have already calculated the coefficients for a bivariate second order spline using MATLAB but want to understand the mathematics behind the calculations. In multivariate splines, you must calculate a spline basis function in each dimension first and then use the tensor product to form a grid which approximates the surface of a higher dimensional function.
The process to calculate the coefficients for multivariate splines can be described in 3 stages as follows:
The formula for the tensor product is as follows:
Here and are the univariate basis functions and are the coefficients. To obtain the coefficients, you must solve a system of linear equations. This system comes from the conditions that the spline must satisfy at the given data points. For your example where ( z = xx + yy ), the coefficients must be chosen so that the spline interpolates the values of z at the points of the grid. After creating the constraints, a system of linear equations is formed which can then be solved to obtain the coefficients.
I hope it helps.
0 Commenti
Vedere anche
Categorie
Scopri di più su Splines in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!