home *** CD-ROM | disk | FTP | other *** search
/ Late Night VRML 2.0 with Java CD-ROM / code.zip / Ch15 / Triangle.wrl < prev    next >
Encoding:
Text File  |  1997-01-29  |  1.0 KB  |  41 lines

  1. #VRML V2.0 utf8
  2.  
  3.  
  4. EXTERNPROTO NurbsCurve [ field SFBool   debug
  5.                          field SFInt32  segments
  6.                          field MFFloat  knotSequence
  7.                          field MFFloat  controlPoints ]
  8. "http://www.ocnus.com/NURBS/NurbsCurve.wrl"
  9.  
  10.  
  11.  
  12. Viewpoint {
  13.   position       0 0 3
  14.   orientation    0 0 1  0
  15.   fieldOfView    0.785398
  16.   description    "NURBS Triangle"
  17. }
  18.  
  19. Shape {
  20.   appearance
  21.       Appearance {
  22.         material
  23.            Material { diffuseColor 1 1 0 }
  24.       }
  25.   geometry
  26.       NurbsCurve {      # Triangle
  27.         debug           TRUE
  28.         segments        0
  29.         knotSequence  [ 0.0,      0.0,
  30.                         0.333333, 0.333333, 
  31.                         0.666666, 0.666666,
  32.                         1.0,      1.0      ]
  33.         controlPoints [ 0  0.866  0  1,
  34.                        -1 -0.866  0  1,
  35.                        -1 -0.866  0  1,
  36.                         1 -0.866  0  1,
  37.                         1 -0.866  0  1,
  38.                         0  0.866  0  1, ]
  39.       }
  40. }
  41.