home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Raytrace & Morphing / SOS-RAYTRACE.ISO / programm / raytrace / rayce27 / csg2.r < prev    next >
Encoding:
Text File  |  1993-11-25  |  692 b   |  36 lines

  1. // yet another CSG testfile
  2.  
  3. camera {
  4.   location <0.1, 0.1, -5>
  5.   fov 90
  6.   look_at <0, 0, 0>
  7. }
  8.  
  9. options { 
  10.   background y color rgb <0.2, 0.2, 0.2>
  11. }
  12.  
  13. #declare WeirdGreen = texture {    /* any suggestions for a better name? */
  14.   diffuse color red 0.8 blue 0.8 ambient color green 0.2
  15. }
  16.  
  17. #declare Cilinder_Z = quadric { <1, 1, 0>, <0, 0, 0>, <0, 0, 0>, -1 }
  18.  
  19. #declare csg4 = composite {
  20.    intersection {
  21.      box { <-2, -2, -2>, <2, 2, 2> }
  22.      quadric { Cilinder_Z inverse }
  23.      texture { WeirdGreen }
  24.    }
  25.    object { light_source { <-4, 4, -4> color red 1.0 } }
  26. }
  27.  
  28. #declare csg6 = union { 
  29.   sphere { <0, 0, 0>, 1 }
  30.   sphere { <0, 0, 1>, 1 }
  31.   texture { WeirdGreen }
  32. }
  33.  
  34.  
  35. composite { csg4 }
  36.