home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Raytrace & Morphing / SOS-RAYTRACE.ISO / programm / raytrace / rayce27 / hier.r < prev    next >
Encoding:
Text File  |  1994-01-02  |  811 b   |  47 lines

  1. // demonstrate of hierarchic textures
  2.  
  3. #include "colors.inc"
  4. camera {
  5.   location <1, 2, -4>
  6. //  location <3, 2.5, 0>
  7.   fov 60
  8.   look_at <0, 1, 1>
  9.   aspect 1.333
  10. }
  11.  
  12. #declare corinth = intersection {
  13.   plane { <-1, 0, 0>, 0 }
  14.   plane { <1, 0, 0>, 0.5
  15.     texture { 
  16.       reflection color White
  17.       ambient color green 1.0
  18.     }
  19.   }
  20.   rotate <0, -30, 0>
  21.   translate <1, 0, 0>
  22.   inverse
  23. }
  24.  
  25. composite {
  26.   sphere { <0, 2, 1>, 1.5 }
  27.   intersection {
  28.     box { <-2, 0, 0>, <2, 2, 3> }
  29.     sphere {
  30.       <-2, 2, 0>, 0.5
  31.       texture { ambient color blue 1.0 }
  32.       inverse
  33.     }    
  34.     intersection { corinth }
  35.     texture {
  36.       ambient color Brown
  37.       ambient 0.2
  38. //      diffuse color Yellow
  39.       diffuse 0.3
  40.     }
  41.   }
  42.   
  43.   light_source { <-3, 4, -5> color White }
  44.   
  45.   texture { ambient color red 1.0 }
  46. }
  47.