Nurbs and curved surfaces

Hi,

I’m trying to draw curved and arced surfaces using opengl. With nurbs the surface doesn’t go through the control points. How do I make the surface curve smoothly through all the control points(can I use the knot values to do this?). Or given the points I want the surface to go through, is there a way to calculate the control points needed that will achieve this?

Thanks.

Hi !

Yes you can do that, but there is no support in OpenGL/GLU for it, you need to interpolate the curve from the control points, this is not a very easy thing to do, but if you take a look at some existing nurbs libraries you can look at the code in there to see how it can be done.

You supply a number of points that are sampled on the curve you want, then the interpolation code will generate a curve that will pass through the list of points you supply, notice that the resulting curve will have new control points, the points you supplied will not be used.

For an example look at IRIT: http://www.cs.technion.ac.il/~irit/

The cagd in IRIT has the nurbs code, just search for interpolate in the documentation, I think the function for curves is named CagdCrvInterpolate().

Mikael

Hey will sounds like what you want is a catmull-rom spline. Have you done any research on that perticular curved surface style? (You will probably have to write your own vertex generator for it though) Good Luck.

I think i have just made a fantastic surface interpolator(and fast) if you want to see E-mail me. I have no time to write now…buy