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