www.pudn.com > nurbs++3_0_10.zip > tnurbs.C
#include// testing of interpolation and approximation int main(){ int i,j ; // Initialize a NURBS curve and generate a list of points from it int deg = 3 ; Vector_HPoint3Df P(10) ; using namespace PLib ; P[0] = HPoint3Df(30,30,0,1) ; P[1] = HPoint3Df(40,60,0,1) ; P[2] = HPoint3Df(80,60,0,1) ; P[3] = HPoint3Df(60,160,0,1) ; P[4] = HPoint3Df(100,80,0,1) ; P[5] = HPoint3Df(120,50,0,1) ; P[6] = HPoint3Df(120,50,0,1) ; P[7] = HPoint3Df(120,50,0,1) ; P[8] = HPoint3Df(160,90,0,1) ; P[9] = HPoint3Df(200,200,0,1) ; Vector_FLOAT U(10+deg+1) ; for(i=0;i