next up previous contents index
Next: 7.13 data/examples/nubgac3.dat Up: 7. Source Files Previous: 7.11 data/examples/nubgac1.dat   Contents   Index


7.12 data/examples/nubgac2.dat


/*
 * FILE: nubgac2.dat
 *
 * example for global curve approximation.  a 14 point data set is
 * approximated by a curve of degree 3 with 8 control points   
 *
 */

curv1 = NUBGAC( 
  3,       /* degree */
  8,       /* number of control points */
           /* vector of data points: */
  dpts1 = 
  ((0,0,0),(1,0,0),(2,0,0),(3,0,0), (4,0,1), 
   (5,0,2),(6,0,2),(7,0,2),(8,0,2), (9,0,3),
   (10,0,4),(11,0,4),(12,0,4),(13,0,4))
);

pts1 = POINTS( dpts1 );
lin1 = POLYLINE( dpts1 );

SCENEROOT = SCENENODE ( (), (), (pts1,curv1,lin1) );


next up previous contents index
Next: 7.13 data/examples/nubgac3.dat Up: 7. Source Files Previous: 7.11 data/examples/nubgac1.dat   Contents   Index
Administrator 2002-01-20