Spline Toolbox | ![]() ![]() |
ppform
The ppform of such a bivariate spline comprises, analogously, a cell array of break sequences, a multidimensional coefficient array, a vector of number pieces, and a vector of polynomial orders. Fortunately, the toolbox is set up in such a way that there is usually no reason for you to concern yourself with these details of either form. You use interpolation, approximation, or smoothing to construct splines, and then use the fn
... commands to make use of them.
Here is an example of a surface constructed as a 3-D-valued bivariate spline. The surface is the famous Möbius band, obtainable by taking a longish strip of paper and gluing its narrow ends together, but with a twist. The figure is obtained by the following commands:
x = 0:1; y = 0:4; h = 1/4; o2 = 1/sqrt(2); s = 2; ss = 4; v(3,:,:) = h*[0, -1, -o2, 0, o2, 1, 0;0, 1, o2, 0, -o2, -1, 0]; v(2,:,:) = [ss, 0, s-h*o2, 0, -s-h*o2, 0, ss;... ss, 0, s+h*o2, 0,-s+h*o2, 0, ss]; v(1,:,:) = s*[0, 1, 0, -1+h, 0, 1, 0; 0, 1, 0, -1-h, 0, 1, 0]; cs = csape({x,y},v,{'
variational'
,'
clamped'
}); fnplt(cs), axis([-2 2 -2.5 2.5 -.5 .5]), shading interp axis off, hold on values = squeeze(fnval(cs,{1,linspace(y(1),y(end),51)})); plot3(values(1,:), values(2,:), values(3,:),'
k'
,'
linew'
,2) hold off
Figure 2-13: A Möbius Band Made by Vector-Valued Bivariate Spline Interpolation
![]() | B-form | NURBS and Other Rational Splines | ![]() |