View Full Version : Help with gluNurbsCurve !!

Guilugi

05-27-2004, 01:59 AM

Hi !

I'm currently using OpenGL NURBS functions, to draw audio curves, with many control points.

I'm using gluNurbsCurve() to do it, and it works quite well, but only with 8 control points max !

Is it possible to draw a curve with more control points (50 would be perfect for me), and in that case,what's the corresponding knot vector ?

Thanks for all answers,

Guilugi

M.Mortier

05-27-2004, 02:11 AM

A NURBS is a spline, so of course you can split it up into other NURBS.

You're going about it the wrong way, I think.. I assume you are making an 8-order NURBS curve so you can have 8 control points? You should make 5 NURBS splines of order 4 instead. Just look into the theory on what b-splines really are and thne you'll understand. Sorry if you're talking about something else.

M.Mortier

05-27-2004, 02:14 AM

And the knot vector for NURBS of order 4 (you should really only use order 4 for this kind of thing, since it has a smallerl ocal impact when you move control points - actually order 3 might be even more appropriate in this implementation), for 50 control points is :

(0,0,0; 0, 1, 2, ..., 49; 49, 49, 49)

(the ones before and after a semicolon are virtual knots, but they're needed to make the spline open-uniform)

And if you're working with a [0,1] bound you'll have to divide everything by 49.0f of course..

Guilugi

05-27-2004, 03:33 AM

Yeah,

Thanks M.Mortier !

In fact, I do exactly what you wrote, I decompose my spline with 4-control point curves, and I can as many points I want.

But there's a discontinuity problem with these curves.

How can I have a continuous patch ?

Thanks a lot again for your answers, I really was in the wrong way !

Guiluge

Adruab

05-27-2004, 08:14 AM

With order 4 you get C3 continuity (as long as each control sequence shares 4 out of 5 points and the same number of knots). I have no idea why that should be not enough. If you're just looking for displaying something, generally C1 continuity is enough (for thing that use derivatives, e.g. tangent space for bump mapping, you need higher degrees).

Are you sharing points and knots in your nurbs curves? I'm not super familiar with the gl NURBS stuff, but from theory that sharing is necessary.

Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.