View Full Version : Nurbs and curved surfaces
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?
06-08-2001, 12:15 AM
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().
06-08-2001, 07:10 AM
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.
06-10-2001, 02:44 AM
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
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.