home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #7 / amigamamagazinepolishissue1998.iso / varia / povray3 / povray3_fpu / povscn / level2 / iortest.pov < prev    next >
Text File  |  1997-12-12  |  3KB  |  105 lines

  1. // Persistence Of Vision raytracer version 3.0 sample file.
  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. #version 3.0
  10. global_settings { max_trace_level 20 assumed_gamma 2.2 }
  11.  
  12. #include "colors.inc"
  13. #include "shapes.inc"
  14. #include "textures.inc"
  15. #include "glass.inc"
  16. #include "consts.inc"              // Index of refraction constants
  17.  
  18. camera {
  19.    location <0, 5, -20>
  20.    direction z
  21.    angle 57
  22.    up  <0.0, 1.0, 0.0>
  23.    right <4/3, 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.  
  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*x           // ... and hoist 'em up into the air
  41.  
  42.     pigment { White }  // Doesn't do anything but suppresses a parser warning
  43. }
  44.  
  45.  
  46. // Horozontally striped floor
  47. plane { y, -1
  48.    pigment {
  49.       checker color HuntersGreen color SummerSky
  50.       scale <32000, 1, 2>
  51.    }
  52.    finish {
  53.       ambient 0.1
  54.       diffuse 0.6
  55.    }
  56. }
  57.  
  58.  
  59. #declare Hummer =
  60. union {
  61.    union {
  62.       object { UnitBox }
  63.       object { Disk_Y translate 2*y }
  64.       sphere { <0, 4, 0>, 1 }
  65.       rotate 45*y
  66.    }
  67.  
  68.    // Let's attach an orange sphere to this thing... off in the distance,
  69.    // so it'll be automatically repeated as we repeat the rest of the
  70.    // object (see below)
  71.    sphere { <0, 5, 20>, 1 texture { finish { Shiny } pigment {Orange} } }
  72. }
  73.  
  74. // Set up a default texture for all objects that follow that don't already
  75. // have a texture of their own
  76. default { texture { T_Glass1 } }
  77.  
  78.  
  79. // Now lay out five of those Hummers
  80. object { Hummer
  81.    translate -6*x
  82.    finish { ior Diamond_Ior }
  83. }
  84.  
  85. object { Hummer
  86.    translate -3*x
  87.    finish { ior Flint_Glass_Ior }
  88. }
  89.  
  90. object { Hummer
  91.    translate 0*x
  92.    finish { ior Crown_Glass_Ior }
  93. }
  94.  
  95. object { Hummer
  96.    translate 3*x
  97.    finish { ior Water_Ior }
  98. }
  99.  
  100. object { Hummer
  101.    translate 6*x
  102.    finish { ior Air_Ior }
  103. }
  104. // end of file iortest.pov
  105.