I have the points on the outside of an object. This object is a distorted cylinder in shape, and there are 40 points in it. I want to make a nurbs surface from theses points, but cannot figure out what the knots are or how to compute them. All the examples I can find have an array of even size (how do they find this size??) containing half zeros and half ones {0,0,0,1,1,1) for example. Trying random knot arrays either draws nothing at all or a very strange shape that passes through 2 or more points from the object but looks like a wadded up piece of paper. Also, do the points in the object need to be in some specific order? Should the object be drawn with 2 nurbs (all examples are a distorted plane, not cylindrical)??
Thanks...
The knots are essentially points in a space where the b-spline basis functions are evaluated. The results of the basis functions over the knots mapped to the rendering space is what gives the b-spline or b-spline surface.
The array that you bring up is that of the knot indeces. For n knots, you could use the sequence {0, 0, 0, 1, 2, ..., k-1, k-1, k-1}.
---
As an aside, it's my opinion that NURBS are seriously constraining and outdated. There are far better and easier solutions to creating nice surfaces, my favourite technique being subdivision.