home *** CD-ROM | disk | FTP | other *** search
/ Late Night VRML 2.0 with Java CD-ROM / code.zip / Ch15 / Square.wrl < prev    next >
Text File  |  1997-01-29  |  1KB  |  43 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 2
  14.   orientation    0 0 1  0
  15.   fieldOfView    0.785398
  16.   description    "NURBS Square"
  17. }
  18.  
  19. Shape {
  20.   appearance
  21.       Appearance {
  22.         material
  23.            Material { diffuseColor 1 1 0 }
  24.       }
  25.   geometry
  26.       NurbsCurve {      # Square
  27.         segments        0
  28.         knotSequence  [ 0.00, 0.00,
  29.                         0.25, 0.25, 
  30.                         0.50, 0.50,
  31.                         0.75, 0.75, 
  32.                         1.00, 1.00, ]
  33.         controlPoints [ 0.5  0.5  0  1,
  34.                        -0.5  0.5  0  1,
  35.                        -0.5  0.5  0  1,
  36.                        -0.5 -0.5  0  1,
  37.                        -0.5 -0.5  0  1,
  38.                         0.5 -0.5  0  1,
  39.                         0.5 -0.5  0  1,
  40.                         0.5  0.5  0  1, ]
  41.       }
  42. }
  43.