home *** CD-ROM | disk | FTP | other *** search
/ ANews 3 / AnewsCD3.iso / atari / GRAPHX / POV / 68030.060 / POV31G30 / POVRAY_3.1G / SCENES / INTERIOR / BALLBOX1.POV < prev    next >
Text File  |  1999-10-30  |  2KB  |  84 lines

  1. // Persistence Of Vision raytracer version 3.1 sample file.
  2. // File by Dan Farmer
  3. // Demonstrates glass textures, CGS with box primitives, one of Mike Miller's
  4. // fabulous marble textures, modified with an "octaves" change, and doesn't
  5. // make a half-bad image, either.  Interesting lighting effect, too.
  6.  
  7. global_settings { assumed_gamma 2.2 }
  8.  
  9. #include "colors.inc"
  10. #include "shapes.inc"
  11. #include "textures.inc"
  12. #include "glass.inc"
  13. #include "stones.inc"
  14.  
  15. camera {
  16.    location  <0.75, 3.5, -3.5>
  17.    direction <0.0,  0.0,  0.5>       //  "wide-angle" view
  18.    up        <0.0,  1.0,  0>
  19.    right     <4/3,  0.0,  0>
  20.    look_at   <0,    0,   -1>}
  21.  
  22. // Light sources, two to the front, right, on from the left, rear.
  23. light_source {<-30, 11,  20> color White}
  24. light_source {< 31, 12, -20> color White}
  25. light_source {< 32, 11, -20> color LightGray}
  26.  
  27. union {
  28.    // A green glass ball inside of a box-shaped frame
  29.    sphere { <0, 0, 0>, 1.75
  30.       interior{
  31.          caustics 1.0
  32.          ior 1.5
  33.       }
  34.       texture {
  35.          T_Glass1
  36.          pigment {color green 0.90 filter 0.85}
  37.          finish {
  38.             phong 1 phong_size 300         // Very tight highlights
  39.             reflection 0.15                // Needs a little reflection added
  40.          }
  41.       }
  42.    }
  43.  
  44.    // A box-shaped frame surrounding a green glass ball
  45.    difference {
  46.       object {UnitBox scale 1.5}     // The outside dimensions
  47.  
  48.       // And some square "holes" in all sides.  Note that each of
  49.       // these boxes that are going to be subtracted has one vector
  50.       // scaled just slightly larger than the outside box.  The other
  51.       // two vectors determine the size of the hole.
  52.       // Clip some sqr holes in the box to make a 3D box frame
  53.       object{UnitBox scale <1.51, 1.25, 1.25> }   // "clip" x
  54.       object{UnitBox scale <1.25, 1.51, 1.25> }   // "clip" y
  55.       object{UnitBox scale <1.25, 1.25, 1.51> }   // "clip" z
  56.  
  57.       pigment { red 0.75 green 0.75 blue 0.85 }
  58.       finish {
  59.          ambient 0.2
  60.          diffuse 0.7
  61.          reflection 0.15
  62.          brilliance 8
  63.          specular 1
  64.          roughness 0.01
  65.       }
  66.  
  67.       // Same as radius of glass sphere, not the box!
  68.       bounded_by {object {UnitBox scale 1.75}}
  69.    }
  70.    rotate y*45
  71. }
  72.  
  73. plane { y, -1.5
  74.    texture {
  75.       T_Stone1
  76.       pigment {
  77.          octaves 3
  78.          rotate 90*z
  79.       }
  80.       finish { reflection 0.10 }
  81.    }
  82. }
  83. // end of file
  84.