next up previous contents index
Next: 7.31 data/examples/nurbsurf6.dat Up: 7. Source Files Previous: 7.29 data/examples/nurbsurf4.dat   Contents   Index


7.30 data/examples/nurbsurf5.dat


/*
 * FILE: nurbsurf5.dat
 *
 * two cylinder halfs tesselated with the same relative fineness
 *
 */

surf1 = NURBSURF( 
  (0., 0., 1., 1.),
  (0., 0., 0., 0.5, 0.5, 1., 1., 1.),
  (
    ((5., 0.,  0., 0.5), (5., 5.,  0., 0.5)),
    ((5., 0., 2.5, 0.5), (5., 5., 2.5, 0.5)),
    ((5., 0.,  5., 1.),  (5., 10., 5., 1.)),
    ((0., 0., 2.5, 0.5), (0., 5., 2.5, 0.5)),
    ((0., 0.,  0., 0.5), (0., 5.,  0., 0.5))   
  )
);

front1 = FRONT_MATERIAL
(
  (0.05, 0.15, 0.075, 1.0),
  (0.0125, 0.0375, 0.019, 1.0),
  (0.0, 0.0, 0.0, 1.0),
  (0.2, 0.6, 0.3, 1.0),
  0.5
);
back1 = BACK_MATERIAL
(
  (0.3, 0.15, 0.12, 1.0),
  (0.075, 0.0375, 0.03, 1.0),
  (0.0, 0.0, 0.0, 1.0), 
  (0.8, 0.4, 0.3, 1.0),
  0.5
);

front2 = FRONT_MATERIAL
(
  (0.05, 0.2, 0.2, 1.0),
  (0.0125, 0.05, 0.05, 1.0),
  (0.0, 0.0, 0.0, 1.0),
  (0.2, 0.8, 0.8, 1.0),
  0.5
);
back2 = BACK_MATERIAL
(
  (0.3, 0.15, 0.12, 1.0),
  (0.075, 0.0375, 0.03, 1.0),
  (0.0, 0.0, 0.0, 1.0),
  (0.8, 0.4, 0.3, 1.0),
  0.5
);

trans1 = TRNSFMAT ( 
  0.3, 0., 0., 0.,
  0., 0.3, 0., 0.,
  0., 0., 0.3, 0.,
  6., -2., 10., 1. );


node2 = SCENENODE(
  (),
  (
    TRANSFORMS(trans1), ATTRIBS(front1, back1)
  ),
  (surf1)
);

SCENEROOT = SCENENODE(
  (node2),
  (
    ATTRIBS(front2, back2, TESSTOL(0.01), OUTLINETRI(1))
  ),
  (surf1)
);


next up previous contents index
Next: 7.31 data/examples/nurbsurf6.dat Up: 7. Source Files Previous: 7.29 data/examples/nurbsurf4.dat   Contents   Index
Administrator 2002-01-20