TCH Sven and Matthew, The Knot vector should have the property that if the NURB is of order n then the 1st n+1 should be 0 and the last n+1 should be 1.0
I am trying to implement using the cartesian coordinate as the control points and i am also facing the same problem of infinite loop
here is my code
x and y are control points
u = [0.0,0.0,0.0,0.0,0.10,.20,.30,.40,.50,.60,.70,.80,.90,1.0,1.0,1.0,1.0];
crv = nrbmak([x';y'],u);
title('Degree elevation of test curve by 1');
% draw nurbs curve
Will be glad to see a quick response
Sven and Matthew, I think I have got a solution to avoid the infinite loop but I don't know why:
NEVER modify the first three 0's and the last three 1's points, they have to be 0's and 1's.
in the democurve script, the last try of the demonstration intend to touch the third zero (which will cause the inifinite loop) so in the democurve.m file the code:
% @forbidden code start
@ forbidden code end
are all forbidden code lines,
are the permissive code lines. Am I clear ? ? :-]
actually the original findspan function seems to be stuck as well. the pure matlab version of the package is also stuck and dropped into the infinite loop, for the time I have got no ideas about the phenomenon. *~*
Is anyone else having fundamental problems with these .m files?
I've gotten the original toolbox, remove all mex/dll files from it, then put in the .m files here.
Anything (such as democurve, nrbplot, etc) gets stuck in an infinite loop inside findspan.m. Does anyone else get this?
I've tried twice downloading/running, and ensured that no other implementation shadows any nurbs toolbox files... Any ideas?