home *** CD-ROM | disk | FTP | other *** search
/ Late Night VRML 2.0 with Java CD-ROM / code.zip / Ch15 / Helix.wrl < prev    next >
Encoding:
Text File  |  1997-01-29  |  1.2 KB  |  46 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 3 15
  14.   orientation    0 0 1  0
  15.   fieldOfView    0.785398
  16.   description    "NURBS Helix"
  17. }
  18.  
  19. Shape {
  20.   appearance
  21.       Appearance {
  22.         material
  23.            Material { diffuseColor 1 1 0 }
  24.       }
  25.   geometry
  26.       NurbsCurve {       # Helix
  27.         segments         100
  28.         knotSequence  [  0,  0,  0,  0,
  29.                          1,  2,  3,  4,  5,  6,  7,  8,  9,
  30.                         10, 10, 10, 10, ]
  31.         controlPoints [ 6.0  0.0  6.0  1,
  32.                        -5.5  0.5  5.5  1,
  33.                        -5.0  1.0 -5.0  1,
  34.                         4.5  1.5 -4.5  1,
  35.                         4.0  2.0  4.0  1,
  36.                        -3.5  2.5  3.5  1,
  37.                        -3.0  3.0 -3.0  1,
  38.                         2.5  3.5 -2.5  1,
  39.                         2.0  4.0  2.0  1,
  40.                        -1.5  4.5  1.5  1,
  41.                        -1.0  5.0 -1.0  1,
  42.                         0.5  5.5 -0.5  1,
  43.                         0.0  6.0  0.0  1, ]
  44.       }
  45. }
  46.