NURBS curve

This is not a pure OpenGL question.
Having a NURBS curve for which I know all control points and the order of the curve, I need to find N 3D points that best represents the NURBS curve ( by best representing the curve I mean that the N points are used for drawing the curve as a set of N-1 line segments).
I’ve looked at the gluNurbsCallback() function, but it seems that it returns a fixed number of vertices used for drawing the NURBS curve, whereas I need to be able to specify the number N of points ( I might sometimes need to represent/draw the curve as 3 line segments, and sometimes as 1000 line segments).
Are there some mathematical formulas to get these points on the NURBS curve? Does anybody knows how OpenGL draws internally the NURBS curve? Does it use a fixed number of points to draw the curve?
Any help would be much appreciated.