• Advertisement
Sign in to follow this  

knotvalues with gluNurbsCurve ??!?!?!

This topic is 4317 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! I am trying to draw net shapes with gluNurbsCurve. The reason is that I want the automatic calculated normals so the net shape can be shaded. I am hoping to be able to draw sharp edges by duplicating the controll points. The reason is that the shape is drawn with GL_LINE_STRIP and glVertex in the old code, but I want some kind of normals so I can shade it, and am hoping to produce exact same shape this way with NURBS. But now I have a big problem assigning knot values... Lets say I have four controll points: [-.3, .3, 0], [-.3, .3, 0], [.3, .3, 0], [.3, .3, 0] drawn with degree 1 After what I've read is that I need: number_on_knots = degree + number_of_controll_points + 1. What values should I assign theses values to? What is the strategy? I want to generate knot values automaticly for nurbs with a large number of controll points. And the NURB curve should pass threw the controll points, produce sharp edges if the controll points define sharp edges.

Share this post


Link to post
Share on other sites
Advertisement
Hi,

I'm not an extert on NURBS, but know a bit. Try using a uniform knot vector. That is one that starts with a full multipicity knot, then simple knots and ends with a full multiplicity. I think a full multiplicity knot has degree+1 many knots of the same value in OpenGL.

try

knots[] = {0,0,1,2,3,3};

Hopefully that will get it working

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement