BSPINTERPCRV: B-Spline interpolation of a 3d curve.
Calling Sequence:
crv = bspinterpcrv (Q, p);
crv = bspinterpcrv (Q, p, method);
[crv, u] = bspinterpcrv (Q, p);
[crv, u] = bspinterpcrv (Q, p, method);
INPUT:
Q - points to be interpolated in the form [x_coord; y_coord; z_coord].
p - degree of the interpolating curve.
method - parametrization method. The available choices are:
'equally_spaced'
'chord_length'
'centripetal' (Default)
OUTPUT:
crv - the B-Spline curve.
u - the parametric points corresponding to the interpolation ones.
See The NURBS book pag. 364 for more information.
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
Q = [1 0 -1 -1 -2 -3;
0 1 0 -1 -1 0;
0 0 0 0 0 0];
p = 2;
crv = bspinterpcrv (Q, p);
plot (Q(1,:), Q(2,:), 'xk');
hold on; grid on;
nrbkntplot (crv);
Produces the following figure
| Figure 1 |
|---|
![]() |
Package: nurbs