[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45295] Division by Zero in 2nd derivative of
From: |
Carlo de Falco |
Subject: |
[Octave-bug-tracker] [bug #45295] Division by Zero in 2nd derivative of NURBS surface |
Date: |
Mon, 15 Jun 2015 10:23:06 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0) Gecko/20100101 Firefox/38.0 |
Follow-up Comment #2, bug #45295 (project octave):
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:
>> knts =
[1,1,1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4,4,5,5,5,5,5,5,6,6,6,6,6,6,7,7,7,7,7,7,8,8,8,8,8,8,9,9,9,9,9,9,9];
>> pts = [sin([0:48]/48*2*pi); cos([0:48]/48*2*pi)];
>> nrb = nrbmak (pts, knts);
>> u = linspace (1, 9, 1000);
>> [d1, d2] = nrbderiv (nrb);
>> [fu, fdu, fd2u] = nrbdeval (nrb, d1, d2, u);
>> plot (u, fdu(1,:))
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?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45295>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/