home *** CD-ROM | disk | FTP | other *** search
/ The Best of Windows 95.com 1996 September / WIN95_09962.iso / vrml / MWE105.ZIP / EExamples / grid.vxr < prev    next >
Text File  |  1996-01-27  |  1KB  |  50 lines

  1. #VRML V1.0 ascii
  2.  
  3. Separator {
  4.     # Options: ON OFF AUTO
  5.     renderCulling AUTO
  6.     
  7.     OUTPUT_TO grid.wrl
  8.     
  9.     PerspectiveCamera { 
  10.         position 5 5 20
  11.         orientation =PointAt(5,0,0)
  12.         focalDistance 20
  13.         heightAngle 45'deg
  14.     }
  15.     
  16.     DEF BackgroundColor Info {
  17.         string  ".1 .5 .7" 
  18.     }
  19.  
  20.     Material {
  21.         diffuseColor =Color("white")
  22.     }
  23.     
  24.     DEF gridDataXZ Coordinate3 {
  25.         point [] # MFVec3f
  26.     }
  27.     
  28.     DEF gridXZ IndexedLineSet {
  29.         coordIndex [] # MFLong
  30.     }
  31.     
  32.     LOOP {
  33.         fields [ SFLong start, SFLong end, SFLong step, SFLong position ]
  34.         start 0
  35.         end 10+1
  36.         step 1   
  37.         
  38.         APPEND gridDataXZ:point (0,0,position)
  39.         APPEND gridDataXZ:point (10,0,position)
  40.         APPEND gridDataXZ:point (position,0,0)
  41.         APPEND gridDataXZ:point (position,0,10)
  42.  
  43.         APPEND gridXZ:coordIndex (position-start)*4
  44.         APPEND gridXZ:coordIndex (position-start)*4+1
  45.         APPEND gridXZ:coordIndex -1        
  46.         APPEND gridXZ:coordIndex (position-start)*4+2
  47.         APPEND gridXZ:coordIndex (position-start)*4+3
  48.         APPEND gridXZ:coordIndex -1        
  49.     }
  50. }