next up previous contents index
Next: 7.12 data/examples/nubgac2.dat Up: 7. Source Files Previous: 7.10 data/examples/formula3_4.dat   Contents   Index


7.11 data/examples/nubgac1.dat


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

curv1 = NUBGAC( 
  3,       /* degree */
  4,       /* 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.12 data/examples/nubgac2.dat Up: 7. Source Files Previous: 7.10 data/examples/formula3_4.dat   Contents   Index
Administrator 2002-01-20