about NURBS surface

I want to display NURB surfaces, read from IGES files of Ideas 4.0, with the
OpenGL glNurbSurface call.

I got all data (s&t knots, s&t orders and all control points from IGES files. But I have servere problems displaying surfaces with order > 2.

control points:2336.83450222,842.6474008,0.0,
2336.83450222,842.6474008,2078.46096908,536.83450222,842.6474008,1039.23048454,-1263.16549778,842.6474008,0.0,536.83450222,842.6474008,-1039.23048454,2336.83450222,842.6474008,-207 8.46096908,2336.83450222,842.6474008,0.0,
2336.83450222,-807.3525992,0.0,2336.83450222,-807.3525992,2078.46096908,536.83450222,-807.3525992,1039.23048454,-1263.16549778,-807.3525992,0.0,536.83450222,-807.3525992,-1039.2304 8454,2336.83450222,-807.3525992,-2078.46096908,2336.83450222,-807.3525992,0.0

This is a cylinder

Hopefully somebody can help me at the moment.

Maybe you could be a bit more specific about the problem, does it display anything, does it crash ? what happens ?, maybe you should post the code that creates the nurb instead of the data, that would make it a little easier.

After all this is an OpenGL forum, not a nurb forum.

Make sure that you have correct number of knots and control points, make sure you pass the right arguments to the glu functions that generate the mesh.



I want to use gluNurbsSurface() to display it, but the graphic isn’t right.
My code:
Please tell me what is wrong.
Thanks a lot.

Hi !

It looks pretty ok to me, but I have not seen the result so it is difficult to say what is wrong, have you checked to control points ? just so that you got the ustride and vstride values correct ?


The ctrolpoints are from an iges file of ideas 4.0, I think it¡¯s right. But its arrangement is a triangle, I don¡¯t know if OpenGL can admit this kind of arrangement.

In addition I¡¯m unclear how define the value of u_stride.


A triangular surface is tricky to do with nurbs surfaces, the result is never good because you get many control points in the same location so you cannot map a texture to it for example with any good result, but it should work.

The best solution for triangles are triangular spline surfaces and no there is no support for them in OpenGL.

The u and v stride is simply the offset from one control point to the next, +3 for “horizontal” movement and “width”*3 for “vertical” movement (next “row”).


Thanks for your help.

But what is triangular spline surfaces? How do it? It can be trimed?

Because my English isn’t good, hope you can use simple sentences to talk with me.Thank you.

I’m writing a repot on the math behind the I-DEAS (NURBS). Can anyone help letting me know any information availabe on that on any book/ any link or giving some information?