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

  1. // a submarine floating in the water...
  2. // my first real rayce scene
  3. // the sub might make a wonderful object for hierarchical bounding boxes.
  4.  
  5. // HWN
  6.  
  7. #include "colors.inc"
  8. #include "shapes.inc"
  9. camera {
  10.   location <-10, 10, -30>
  11.   sky <0, 1, 0>
  12.   fov 80
  13.   aspect 1.333
  14.   look_at <0, 0, 0>
  15. }
  16.  
  17. options { 
  18.   background color SkyBlue  
  19.   time 0.0, 2.0
  20.   iterations 16
  21. }
  22.  
  23. #declare water = object {
  24.   plane { <0, 1, 0>, 0 }
  25.   texture {
  26.     diffuse color green .1 blue .05
  27.     specular color red .05 green .15 blue .12
  28.     ambient color CornflowerBlue  
  29.     reflection color Grey50
  30.     reflection 0.8
  31.     reflect_angle 3
  32.   }
  33. }
  34.  
  35. #declare hull = texture {
  36.       ambient color Grey10
  37.       diffuse color red 0.1 blue 0.2 green 0.2
  38.       specular color red 0.1 blue 0.2 green 0.2
  39.       roughness 0.7
  40. }
  41.  
  42. #declare sub = composite {
  43.   object {
  44.     quadric { Ellipsoid }
  45.     scale <20, 3, 3>
  46.   }
  47.   object {
  48.     box { <-10, 0, -2>, <10, 3, 2> }
  49.   }
  50.   object { // flap
  51.     polygon { <18, 0, 0>, <22, 0, 0>, <22, 5, 0>, <18, 5, 0> }
  52.   }
  53.   object {
  54.     triangle { <18, 0 ,0>, <18, 5, 0>, <16.5, 0, 0> }
  55.   }
  56.  
  57.   object {
  58.     polygon { <-3, 5, -4>, <0, 5, -4>, <0, 5, 4>, <-3, 5, 4> translate <2, 0 , 0> }
  59.   }
  60.   object { // command tower
  61.     intersection {
  62.       Y_Disk
  63.       scale <2.5, 4, 1> 
  64.       translate <0, 3, 0>
  65.     }
  66.   }
  67.   
  68.   /* make love, not war */ /* oeps, foutje :) */
  69.   object { // cannon tower
  70.     union { 
  71.       sphere { <-8, 3, 0>, 1 } 
  72.       intersection { 
  73.         X_Disk
  74.     scale <-1, 0.2, 0.2>
  75.     translate <-8.8, 3.3, 0>
  76.       }
  77.     }
  78.     texture { 
  79.       ambient color Grey20
  80.       diffuse color Grey70
  81.     }
  82.   }
  83.   texture { hull }
  84.   bounded_by { box { <-22, -3, -3>, <22, 6, 3> } }
  85. }
  86.  
  87. composite {
  88.   sub
  89. }
  90.  
  91. object { water }
  92.  
  93. object {
  94.   light_source { <-30, 100, -20> color White }
  95. }
  96.