home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 2 / crawlyvol2.bin / graphics / ftpovscn / 2 / iortest.pov < prev    next >
Text File  |  1992-07-21  |  3KB  |  95 lines

  1. // Persistence of Vision Raytracer
  2. // This file demonstrates the use of the file "ior.inc" and a few other
  3. // interesting and useful tricks.  It can take a bit of time to render,
  4. // (he said, understatingly), because of the transparency and because of
  5. // the 7 element light bank (flourescent tube?).  Eliminating some of the
  6. // lights (and adjusting the brightness color, "Watts", accordingly)
  7. // will help quite a bit.
  8.  
  9. #include "colors.inc"
  10. #include "shapes.inc"
  11. #include "textures.inc"
  12. #include "fov.inc"                  // Field of view constants
  13. #include "ior.inc"                  // Index of refraction constants
  14.  
  15. //max_trace_level 2                  // Use for faster debugging only!
  16. max_trace_level 4                  // This should be enough for these shapes
  17.  
  18.  
  19. camera {
  20.    location <0  5  -20>
  21.    direction <0.0 0.0  FoV_60>     // Use a 60o field of view
  22.    up  <0.0  1.0  0.0>
  23.    right <1.33333 0.0 0.0>
  24.    look_at <0 1 0>
  25. }
  26.  
  27. // Assemble a bank of lights here, on the ground...
  28. #declare Watts = color Gray25
  29. #declare Light_Distance = -50
  30. object {
  31.     union {
  32.         light_source  { < -6  0  Light_Distance>  color Watts  }
  33.         light_source  { < -4  0  Light_Distance>  color Watts  }
  34.         light_source  { < -2  0  Light_Distance>  color Watts  }
  35.         light_source  { <  0  0  Light_Distance>  color Watts  }
  36.         light_source  { <  2  0  Light_Distance>  color Watts  }
  37.         light_source  { <  4  0  Light_Distance>  color Watts  }
  38.         light_source  { <  6  0  Light_Distance>  color Watts  }
  39.     }
  40.     rotate <60 0 0>           // ... and hoist 'em up into the air
  41. }
  42.  
  43.  
  44. // Horozontally striped floor
  45. object { plane { <0 1 0> -1 }
  46.     texture {
  47.         checker
  48.             color HuntersGreen
  49.             color SummerSky
  50.         ambient 0.1
  51.         diffuse 0.6
  52.         scale <32000 1 2>
  53.     }
  54. }
  55.  
  56.  
  57. #declare Hummer =
  58. union {
  59.     // Chris Young's shape from textures.pov
  60.    union {
  61.       box{ UnitBox }
  62.       intersection{ Disk_Y translate <0 2 0> }
  63.       sphere{<0 4 0> 1 }
  64.       rotate <0 45 0>
  65.    }
  66.  
  67.     // Let's attach an orange sphere to this thing... off in the distance,
  68.    // so it'll be automatically repeated as we repeat the rest of the
  69.     // object (see below)
  70.    sphere { <0 5 20> 1 texture { Shiny color Orange } }
  71. }
  72.  
  73. // Set up a default texture for all objects that follow that don't already
  74. // have a texture of their own
  75. default { texture { Glass2 } }
  76.  
  77.  
  78. // Now lay out five of those Hummers
  79. object { union { Hummer translate <-6 0 0> }
  80.     texture { ior Diamond_Ior }
  81. }
  82. object { union { Hummer translate <-3 0 0> }
  83.     texture { ior Flint_Glass_Ior }
  84. }
  85. object { union { Hummer translate <0 0 0> }
  86.     texture { ior Crown_Glass_Ior }
  87. }
  88. object { union { Hummer translate <3 0 0> }
  89.     texture { ior Water_Ior }
  90. }
  91. object { union { Hummer translate <6 0 0> }
  92.     texture { ior Air_Ior }
  93. }
  94. // end of file iortest.pov
  95.