PDA

View Full Version : Question About NURBS



xiaomi
04-14-2005, 05:44 PM
How to set the parmeters of NURBS to display the uniform B-spline surface?

SirKnight
04-14-2005, 06:23 PM
Setting parameters is hardly advanced discussion.

http://www.edm2.com/0608/opengl.html
http://www.mat.ucsb.edu/~c.ramakr/articles/dls/nurbs.pdf
http://msdn.microsoft.com/library/en-us/opengl/over02_3x6b.asp
http://rush3d.com/reference/opengl-redbook-1.1/chapter11.html

There's a start. Just so you'll know next time, I found these easily by googling for "opengl nurbs."

-SirKnight

xiaomi
04-15-2005, 09:16 PM
I am very happy to receive your reply.
I have read the files about NURBS you mentioned.
Thank you very much!
But I have had some questions yet.
In nonuniform-B spline,the two ends of the knots vector is repeated.it has repeated knots. and in the nuniform-B spline has not.
so,how can I set the parameters of gluNurbsSurface?

expect the reply.
sincerely,
xiaomi

michagl
04-16-2005, 06:43 AM
gluNURBSsurface just does N.on U.niform R.ational B.S.plines.

it isn't very flexible, but you may as well use it as uniform bsplines is a subset of nurbs. otherwise you will have to use the glEvaluators API directly.

according to docs it looks like the glEvaluators API is sufficient for any sort of spline surface. it is pretty clunky however... so i would just recommend gluNurbsSurface unless you want total control over your system and a high degree of efficiency (maybe patch level control and culling etc.)

i believe the direct low level glEvaluators interface can only draw one 'support' at a time. i figure gluNurbsSurface must use glEvaluators at the lowest level as well... so managing glEvaluators your self, though more envolved, does not necesarilly come with a performance hit as far as your implimentation is at least as effecient as gluNurbsSurface.

someone please correct me if i'm wrong on any of these points!

michagl
04-16-2005, 10:07 AM
oh, i think i get your question!

you might want to try replicating the first and last knots until there are as many knots as their are control points plus the order of the surface.

i think this is the best you can do with gluNurbsSurface if it isn't correct for you .