Step 3 glBegin(GL_LINE_STRIP); glColor3f(0, 1, 0); for (int i = 0; i != LOD; ++i) { float t = (float)i / (LOD - 1); float it = 1.0f - t; // calculate the x, y and z of the curve point float x = BezierQuintic(Points[0][0], Points[1][0], Points[2][0], Points[3][0], Points[4][0], Points[5][0], t); float y = BezierQuintic(Points[0][1], Points[1][1], Points[2][1], Points[3][1], Points[4][1], Points[5][1], t); float z = BezierQuintic(Points[0][2], Points[1][2], Points[2][2], Points[3][2], Points[4][2], Points[5][2], t); // specify the point glVertex3f(x, y, z); } glEnd();