EnnoF

07-31-2009, 09:01 AM

Using GLU 1.3 I thought that control points and knots

float uctls[UCTLS][USTRIDE] = {{1,0,0,1}, {1,1,0,H}, 0,1,0,1}};

GLfloat uknots[UORDER + UCTLS] = {0.0, 0.0, 0.0, 1.0, 1.0, 1.0};

where H = sqrt(2.0)/2.0 should cause

gluNurbsCurve(nurb, UCTLS + UORDER, uknots, USTRIDE, (float*) uctls, UORDER, GL_MAP1_VERTEX_4);

to draw a quarter unit circle in the 1st quadrant.

In fact I get a arc strongly bulging in the (1,1) direction.

When using H = 1.0 as homogeneous coordinate I get (against my expectation) something that closely resembles a quarter circle although still very slightly bulging.

What do I miss?

EnnoF

float uctls[UCTLS][USTRIDE] = {{1,0,0,1}, {1,1,0,H}, 0,1,0,1}};

GLfloat uknots[UORDER + UCTLS] = {0.0, 0.0, 0.0, 1.0, 1.0, 1.0};

where H = sqrt(2.0)/2.0 should cause

gluNurbsCurve(nurb, UCTLS + UORDER, uknots, USTRIDE, (float*) uctls, UORDER, GL_MAP1_VERTEX_4);

to draw a quarter unit circle in the 1st quadrant.

In fact I get a arc strongly bulging in the (1,1) direction.

When using H = 1.0 as homogeneous coordinate I get (against my expectation) something that closely resembles a quarter circle although still very slightly bulging.

What do I miss?

EnnoF