NRBUNCLAMP: Compute the knot vector and control points of the unclamped curve or surface.
Calling Sequence:
ucrv = nrbrunclamp (crv)
ucrv = nrbrunclamp (crv, k)
ucrv = nrbrunclamp (crv, k, dim)
INPUT:
crv : NURBS curve or surface, see nrbmak.
k : continuity for the unclamping, from 0 up to p-1 (p-1 by default).
dim : dimension in which to unclamp (all by default).
OUTPUT:
ucrv: NURBS curve with unclamped knot vector, see nrbmak
Description:
Unclamps a curve, removing the open knot vector. Computes the new
knot vector and control points of the unclamped curve.
Adapted from Algorithm A12.1 from 'The NURBS BOOK' pg577.
Copyright (C) 2013, 2014, 2017 Rafael Vazquez
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
crv = nrbcirc (1,[],0,2*pi/3);
crv = nrbdegelev (crv, 2);
figure
nrbctrlplot (crv); hold on
nrbctrlplot (nrbtform (nrbunclamp (crv, 1), vectrans([-0.4, -0.4])));
nrbctrlplot (nrbtform (nrbunclamp (crv, 2), vectrans([-0.8, -0.8])));
nrbctrlplot (nrbtform (nrbunclamp (crv, 3), vectrans([-1.6, -1.6])));
title ('Original curve and unclamped versions')
Produces the following figure
| Figure 1 |
|---|
![]() |
Package: nurbs