Curves that interpolate points

Hi, it is possible to draw a curve/surface using NURBS that actually interpolates a given set of points?
If not, then how do I do this?
Do I need some function that takes a set of points and derives the required control points? If so does anybody know of any?

I’d be very grateful for any help.
Cheers,

Paul

Yes it is possible to create an interpolating curve using NURBS (or BSplines). One way to do this is to compute control points for the curve by ensuring that the curve value at each knot value equals the point to be interpolated. This creates a tridiagonal system of equations that can be easily solved.

Interpolating surfaces is similar and can also be done using polar forms.

Thanks, but I’m still not sure where to go from here.
How do I make the curve value at each knot value equal the point to be interpolated?

Does anybody have any example code?

While I don’t know any sample code with OpenGL calls that does what you want, I think I can offer some information.
Since you said “Interpolation”, instead of “Approximation”, that means you want a curve that pass through all the points. Also you should have an ordered set of points, P_i, where i=1,…,n, and the curve starts from P_1, pass through P_2, P_3,…and ends at P_n. Otherwise, you may sort the points based on their projections onto a curve or axis.
Except in some very special cases, setting the input points to be the control points will NOT make the NURB curve pass through the input points. There is book titled : “The NURBS Book” written by Piegl and Tiller has a lot of mathematical descriptions about interpolation and approximation.

Depending on what eactly you want to do, you might also want to take a look at interpolating subdivision surfaces.