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

  1. #VRML V2.0 utf8
  2.  
  3.  
  4. EXTERNPROTO NurbsRevolve [ field SFBool   debug
  5.                            field SFInt32  uSegments
  6.                            field SFInt32  vSegments
  7.                            field MFFloat  uKnotSequence
  8.                            field MFFloat  vKnotSequence
  9.                            field SFInt32  numUControlPoints
  10.                            field SFInt32  numVControlPoints
  11.                            field MFFloat  controlPoints
  12.                            field SFBool   ccw
  13.                            field SFFloat  creaseAngle
  14.                            field SFBool   solid                ]
  15. "http://www.ocnus.com/nurbs/NurbsSurface.wrl"
  16.  
  17.  
  18.  
  19. Viewpoint {
  20.   position       0 0 5
  21.   orientation    0 0 1  0
  22.   fieldOfView    0.785398
  23.   description    "NURBS Dome"
  24. }
  25.  
  26. Shape {
  27.   appearance
  28.       Appearance {
  29.         material
  30.            Material { diffuseColor 1 1 0 }
  31.       }
  32.   geometry
  33.       NurbsRevolve {           # Dome
  34.         debug                  FALSE
  35.         uSegments              20
  36.         vSegments              20
  37.         numUControlPoints       5
  38.         numVControlPoints       5
  39.         uKnotSequence  [ 0.0, 0.0, 0.0,
  40.                          0.5, 0.5,
  41.                          1.0, 1.0, 1.0 ]
  42.         vKnotSequence  [ 0.0, 0.0, 0.0,
  43.                          0.5, 0.5,
  44.                          1.0, 1.0, 1.0 ]
  45.         controlPoints  [ 1         0         0         1,
  46.                          0.707107  0        -0.707107  0.707107,
  47.                          0         0        -1         1,
  48.                         -0.707107  0        -0.707107  0.707107,
  49.                         -1         0         0         1,
  50.  
  51.                          1         0         0         1,
  52.                          0.707107  0.60     -0.60      0.707107,
  53.                          0         0.707107 -0.707107  0.707107,
  54.                         -0.707107  0.60     -0.60      0.707107,
  55.                         -1         0         0         1,
  56.  
  57.                          1         0         0         1,
  58.                          0.707107  0.707107  0         0.707107,
  59.                          0         1         0         1,
  60.                         -0.707107  0.707107  0         0.707107,
  61.                         -1         0         0         1,
  62.  
  63.                          1         0         0         1,
  64.                          0.707107  0.60      0.60      0.707107,
  65.                          0         0.707107  0.707107  0.707107,
  66.                         -0.707107  0.60      0.60      0.707107,
  67.                         -1         0         0         1,
  68.  
  69.                          1         0         0         1,
  70.                          0.707107  0         0.707107  0.707107,
  71.                          0         0         1         1,
  72.                         -0.707107  0         0.707107  0.707107,
  73.                         -1         0         0         1,        ]
  74.       }
  75. }
  76.