BSPINTERPSURF: B-Spline surface interpolation. Calling Sequence: srf = bspinterpsurf (Q, p, method); INPUT: X, Y, Z - grid of points to be interpolated. (See ndgrid) p - degree of the interpolating curve ([degree_x, degree_y]). method - parametrization method. The available choices are: 'equally_spaced' 'chord_length' (default) OUTPUT: srf - the B-Spline surface. See The NURBS book pag. 376 for more information. As of now only the chord length method is implemented. Copyright (C) 2015 Jacopo Corno This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The following code
x = linspace (-3, 3, 40); y = linspace (-3, 3, 40); [X, Y] = meshgrid (x, y); Z = peaks (X, Y); srf1 = bspinterpsurf (X, Y, Z, [2 2], 'equally_spaced'); srf2 = bspinterpsurf (X, Y, Z, [2 2], 'chord_length'); figure nrbkntplot(srf1) title ('Approximation of the peaks functions, with the equally spaced method') figure nrbkntplot(srf2) title ('Approximation of the peaks functions, with the chord length method')
Produces the following figures
Figure 1 | Figure 2 |
---|---|
Package: nurbs