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

  1. #VRML V2.0 utf8
  2.  
  3.  
  4. EXTERNPROTO NurbsRevolve [ field SFBool   debug
  5.                            field SFInt32  segments
  6.                            field SFFloat  minAngle
  7.                            field SFFloat  maxAngle
  8.                            field SFInt32  profileSegments
  9.                            field MFFloat  profileKnotSequence
  10.                            field MFFloat  profileControlPoints
  11.                            field SFBool   ccw
  12.                            field SFFloat  creaseAngle
  13.                            field SFBool   solid                ]
  14. "http://www.ocnus.com/NURBS/NurbsRevolve.wrl"
  15.  
  16.  
  17.  
  18. Viewpoint {
  19.   position       0 0 5
  20.   orientation    0 0 1  0
  21.   fieldOfView    0.785398
  22.   description    "NURBS Sphere"
  23. }
  24.  
  25. Shape {
  26.   appearance
  27.       Appearance {
  28.         material
  29.            Material { diffuseColor 1 1 0 }
  30.       }
  31.   geometry
  32.       NurbsRevolve {           # Sphere
  33.         debug                  FALSE
  34.         segments               20
  35.         profileSegments        20
  36.         profileKnotSequence  [ 0.0, 0.0, 0.0,
  37.                                0.5, 0.5,
  38.                                1.0, 1.0, 1.0 ]
  39.         profileControlPoints [ 0        -1         0  1,
  40.                                0.707107 -0.707107  0  0.707107,
  41.                                1         0         0  1,
  42.                                0.707107  0.707107  0  0.707107,
  43.                                0         1         0  1,        ]
  44.       }
  45. }
  46.