home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / graphic / csg_rt / glass.rt < prev    next >
Text File  |  1992-11-01  |  2KB  |  57 lines

  1. ;
  2. ; A glass
  3. ;
  4. ; This is the standard testcard and speed-trial testcase.
  5. ;
  6. ; us.bmp is a backdrop picture, approximately 250x200 in size.
  7. ; Since we use xyz(0.02,0,0) and xyz(0,0.02,0) in the col_remap, the 250x100
  8. ; pixels will cover approximately 5 by 4 units.
  9. ;
  10.  
  11. set_col col_white col(rgb(1,1,1))
  12.  
  13. set_col col_wall col_remap(xyz(0,0,0),xyz(0.02,0,0),xyz(0,0.02,0),xyz(0,0,0.02),
  14.                    col_field2d(0,0,"ursula.bmp"))
  15.  
  16. set_surf surf_wall surf(0.1,0.85,0.05,0,col_wall,col_white,200,1)
  17. set_shape shape_wall z_lt(-3,surf_wall)
  18.  
  19. set_col col_floor col(rgb(0.8,0.6,0))
  20. set_surf surf_floor surf(0.5,0.5,0.5,0,col_floor,col_white,50,1)
  21. set_shape shape_floor y_lt(0,surf_floor)
  22.  
  23. set_col col_glass col(rgb(0,1,1))
  24. set_surf surf_glass surf(0.1,0.1,0.1,1.0,col_glass,col_white,200,1.5)
  25.  
  26. set_shape shape_top trans_y(isect(diff(ellipsoid(1.5,3.0,1.5,surf_glass),
  27.                        ellipsoid(1.4,2.8,1.4,surf_glass)
  28.                       ),
  29.                       y_lt(0,surf_glass)
  30.                      ),
  31.                     4
  32.                    )
  33.  
  34. set_shape shape_stem isect(y_cyl(0.3,surf_glass),
  35.                y_gt(0.00001,surf_glass),
  36.                y_lt(1.05,surf_glass)
  37.               )
  38.  
  39. set_shape shape_base isect(y_cyl(1.7,surf_glass),
  40.                y_gt(0.00001,surf_glass),
  41.                y_lt(0.3,surf_glass)
  42.               )
  43.  
  44. set_shape shape_glass union(shape_top,shape_stem,shape_base)
  45.  
  46. set_attenuation 1 0.98
  47. set_ambient rgb(0.2,0.4,0.6)
  48. add_light xyz( 3, 2, 2) rgb(1,1,1)
  49. add_light xyz(-3, 3, 2) rgb(1,1,1)
  50.  
  51. render union(shape_wall,shape_floor,shape_glass)
  52.        xyz( 0, 2.5, 6)
  53.        xyz( 0, 0  ,-1)
  54.        xyz( 0, 1  , 0)
  55.        rad(30) rad(30) 256 256 3
  56.        "glass.bmp"
  57.