View Full Version : query on evaluator using control points for curves

01-13-2004, 12:47 AM
I wish to enquire whether the suppose i specify 3 points to draw a curve, the 1st is start point, the 2nd is end point of the curve. the last point (middle part of curve): does it actually lie on the curve or it is just a point that pulls the curve towards it?

01-13-2004, 04:50 AM
I understand that evaluators uses the start, end and control points to draw a 3D surface.The control points do not lie on the surface itself so to draw a 3D 1/4 hollow cylinder. What should the middle control point be? i tried these points:

GLfloat ctrlPoints[3][3][3]={{
{0.0f,-d,1.0f}}, //v=0
{0.0f,-d,0.0f}}, //v=1

assumming d is radius of cylinder. But somehow it doesn't look that accurate. In addition the following code work when i use GL_LINE but not if i change it to GL_FILL, how do i resolve this?

// the setup function
glMap2f(GL_MAP2_VERTEX_3, // Type of data generated
0.0f, // Lower u range
10.0f, // Upper u range
3, // Distance between points in the data
3, // Dimension in u direction (order)
0.0f, // Lower v range
10.0f, // Upper v range
9, // Distance between points in the data
3, // Dimension in v direction (order)
&ctrlPoints[0][0][0]); // array of control points

// Enable the evaluator

// Map a grid of 100 points from 0 to 100
// Evaluate the grid, using lines