home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / APPS / RAYTRACE / RT / DIE.RT < prev    next >
Text File  |  1993-10-25  |  2KB  |  64 lines

  1. ;
  2. ; A die
  3. ;
  4.  
  5. set_surf surf_cube surf(0.2,0.6,0.2,0,col(rgb(1.0,0.0,0.0)),col(rgb(1.0,1.0,1.0)),200,1)
  6. set_surf surf_ball surf(0.1,0.7,0.2,0,col(rgb(1.0,1.0,0.5)),col(rgb(1.0,1.0,1.0)),150,1)
  7. set_surf surf_spot surf(0.2,0.6,0.2,0,col(rgb(1.0,1.0,1.0)),col(rgb(1.0,1.0,1.0)),200,1)
  8.  
  9. set_shape shape_cube isect(x_in(-1.0,1.0,surf_cube),
  10.                y_in(-1.0,1.0,surf_cube),
  11.                z_in(-1.0,1.0,surf_cube))
  12.  
  13. set_shape shape_ball sphere(1.55,surf_ball)
  14. set_shape shape_spot sphere(0.2,surf_spot)
  15.  
  16. set_shape shape_spots1       trans(shape_spot,xyz(-1.0, 0.0, 0.0))
  17.  
  18. set_shape shape_spots2 union(trans(shape_spot,xyz( 0.6,-1.0, 0.6)),
  19.                  trans(shape_spot,xyz(-0.6,-1.0,-0.6)))
  20.  
  21. set_shape shape_spots3 union(trans(shape_spot,xyz( 0.0, 0.0, 1.0)),
  22.                  trans(shape_spot,xyz( 0.6, 0.6, 1.0)),
  23.                  trans(shape_spot,xyz(-0.6,-0.6, 1.0)))
  24.  
  25. set_shape shape_spots4 union(trans(shape_spot,xyz( 0.6, 0.6,-1.0)),
  26.                  trans(shape_spot,xyz( 0.6,-0.6,-1.0)),
  27.                  trans(shape_spot,xyz(-0.6, 0.6,-1.0)),
  28.                  trans(shape_spot,xyz(-0.6,-0.6,-1.0)))
  29.  
  30. set_shape shape_spots5 union(trans(shape_spot,xyz( 0.6, 1.0, 0.6)),
  31.                  trans(shape_spot,xyz( 0.6, 1.0,-0.6)),
  32.                  trans(shape_spot,xyz(-0.6, 1.0, 0.6)),
  33.                  trans(shape_spot,xyz(-0.6, 1.0,-0.6)),
  34.                  trans(shape_spot,xyz( 0.0, 1.0, 0.0)))
  35.  
  36. set_shape shape_spots6 union(trans(shape_spot,xyz( 1.0, 0.6, 0.6)),
  37.                  trans(shape_spot,xyz( 1.0, 0.6,-0.6)),
  38.                  trans(shape_spot,xyz( 1.0, 0.0, 0.6)),
  39.                  trans(shape_spot,xyz( 1.0, 0.0,-0.6)),
  40.                  trans(shape_spot,xyz( 1.0,-0.6, 0.6)),
  41.                  trans(shape_spot,xyz( 1.0,-0.6,-0.6)))
  42.  
  43. set_shape shape_spots union(shape_spots1,shape_spots2,shape_spots3,
  44.                 shape_spots4,shape_spots5,shape_spots6)
  45.  
  46. set_shape shape_dice isect(diff(shape_cube,shape_spots),shape_ball)
  47.  
  48. set_attenuation 1.0 0.9
  49. set_ambient rgb(0.0,0.0,0.0)
  50.  
  51. add_light xyz( 2.0, 2.0, 2.0) rgb(2.5,2.5,2.5)
  52. add_light xyz(-2.0,-2.0, 2.0) rgb(2.5,2.5,2.5)
  53.  
  54. set_shape r rot_x(shape_dice,0.4)
  55. set_xyz   e xyz( 0.0, 0.0, 4.0)
  56. set_xyz   f xyz( 0.0, 0.0,-1.0)
  57. set_xyz   u xyz( 0.0, 1.0, 0.0)
  58.  
  59. ; Render using usual basic render
  60. render rot_y(r,rad( 30)) e f u rad(35) rad(35) 200 200 0 0 "die0.bmp"
  61.  
  62. ; Render an anti-aliased version using Whitted adaptive supersampling
  63. render rot_y(r,rad( 30)) e f u rad(35) rad(35) 200 200 0 1 "die1.bmp"
  64.