home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Raytrace & Morphing / SOS-RAYTRACE.ISO / programm / raytrace / rayce27 / pyramid.r < prev    next >
Encoding:
Text File  |  1993-12-28  |  1.7 KB  |  80 lines

  1. // a recursive pyramid.
  2.  
  3. camera {
  4.   location <-2, 3, -4>
  5.   scale <1.2>
  6.   look_at <0, 1, 0>
  7.   fov 60
  8. }
  9.  
  10. #declare  prim = sphere { <0, 0, 0>, 1 }
  11.  
  12. #declare twit = composite { 
  13.   sphere { prim translate <-2, 0, 0> }
  14.   sphere { prim translate <2, 0, 0> }
  15.   sphere { prim translate <0, 0, 2> }
  16.   sphere { prim translate <0, 0, -2> }
  17.   sphere { prim translate <0, 2.5, 0> }
  18.   bounded_by { box { <-3, -1, -3>, <3, 3, 3> } }
  19.   scale <0.4, 0.4, 0.4>
  20. }
  21.  
  22.  
  23. #declare t1 = texture {
  24.     ambient color red 1.0
  25.     diffuse color blue 1.0
  26.   
  27. }
  28.  
  29. #declare t2 = texture {
  30.     ambient color red 1.0
  31.     diffuse color blue 1.0
  32.   
  33. }
  34.  
  35. #declare t3 = texture {
  36.     ambient color red 1.0
  37.     diffuse color blue 1.0
  38.   
  39. }
  40. #declare t4 = texture {
  41.     ambient color red 1.0
  42.     diffuse color blue 1.0
  43.   
  44. }
  45.  
  46. #declare t5 = texture {
  47.     ambient color red 1.0
  48.     diffuse color blue 1.0
  49. }
  50.  
  51.  
  52. #declare twat = composite { 
  53.   composite { twit translate <-2, 0, 0> texture { t1 } }
  54.   composite { twit translate <2, 0, 0> texture { t2 } }
  55.   composite { twit translate <0, 0, 2> texture { t3 } }
  56.   composite { twit translate <0, 0, -2> texture { t4 } }
  57.   composite { twit translate <0, 1.5, 0> texture { t5 } }
  58.   bounded_by { box { <-3.2, -1.30, -3.2>, <3.2, 2.5, 3.2> } }
  59.   scale <0.4, 0.4, 0.4>
  60. }
  61.  
  62. #declare twit = composite { 
  63.   composite { twat translate <-2, 0, 0> }
  64.   composite { twat translate <2, 0, 0> }
  65.   composite { twat translate <0, 0, 2> }
  66.   composite { twat translate <0, 0, -2> }
  67.   composite { twat translate <0, 1.5, 0> }
  68.   bounded_by { box { <-3.2, -1.30, -3.2>, <3.2, 2.5, 3.2> } }
  69.   texture { 
  70.     ambient color red 1.0
  71.     diffuse color blue 1.0
  72.   }
  73. }
  74.  
  75. composite { twit }
  76.  
  77. light_source {
  78.   <-5, 5, -5> color red 1.0 green 1.0 blue 1.0 attenuation 0.2
  79. }
  80.