Mon 15 Jun 2015 11:43:25 AM UTC, comment #4:
Hi,
nrbderiv is based on bspderiv that implements
the algorith A3.3 on page 98 of the book:
Piegl, Les and Tiller, Wayne
The Nurbs Book
Springer, New York, 1997 (2nd ed.)
which assumes the input knot vector has at most
p repetitions per knot, p being the degree,
corresponding to C0 continuity.
therefore you can compute the first derivative of a C0
curve but not its second derivative.
On the other hand, I believe that, if you take the C(-1) curve
obtained by performing the first derivative,
the knots and control points of each knot span
should define a Bezier curve.
So if you have a BSpline curve you should be able to
compute the second derivative by cycling over each knotspan
and taking the local knotvector.
I am not sure how this works for rational BSplines,
maybe Rafael can comment on this.
c.
|
Mon 15 Jun 2015 10:23:06 AM UTC, comment #2:
Hi,
It seems that the example geometry you provided has only C0 regularity, so it is to be expected that the 2nd order derivatives be undefined.
using the knots and control points along the first direction
given in your example you can try the following univariate example:
notice the discontinuities in the first derivative are clearly visible in the plot,
we are considering whether it makes sense to add a check and an error message in cases like this.
Do you have an example where computing derivatives fails with a more regular geometry?
|