home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 13 Bitmap / 13-Bitmap.zip / povscn.zip / scenes / level1 / ballbox1.pov next >
Text File  |  1993-09-28  |  2KB  |  77 lines

  1. // Persistence of Vision Raytracer 2.0
  2. // Image 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. #include "colors.inc"           // Standard colors library
  8. #include "shapes.inc"           // Commonly used object shapes
  9. #include "textures.inc"         // LOTS of neat textures.  Lots of NEW textures.
  10. #include "stones.inc"
  11.  
  12. camera {
  13.    location  <0.75, 3.5, -3.5>
  14.    direction <0.0,  0.0,  0.5>       //  "wide-angle" view
  15.    up        <0.0,  1.0,  0>
  16.    right     <4/3,  0.0,  0>
  17.    look_at   <0,    0,   -1>}
  18.  
  19. // Light sources, two to the front, right, on from the left, rear.
  20. light_source {<-30, 11,  20> color White}
  21. light_source {< 31, 12, -20> color White}
  22. light_source {< 32, 11, -20> color LightGray}
  23.  
  24. union {
  25.    // A green glass ball inside of a box-shaped frame
  26.    sphere { <0, 0, 0>, 1.75
  27.       texture {
  28.          Glass
  29.          pigment {color green 0.90 filter 0.85}
  30.          finish {
  31.             phong 1 phong_size 300         // Very tight highlights
  32.             reflection 0.15                // Needs a little reflection added
  33.          }
  34.       }
  35.    }
  36.  
  37.    // A box-shaped frame surrounding a green glass ball
  38.    difference {
  39.       object {UnitBox scale 1.5}     // The outside dimensions
  40.  
  41.       // And some square "holes" in all sides.  Note that each of 
  42.       // these boxes that are going to be subtracted has one vector 
  43.       // scaled just slightly larger than the outside box.  The other 
  44.       // two vectors determine the size of the hole.
  45.       // Clip some sqr holes in the box to make a 3D box frame
  46.       object{UnitBox scale <1.51, 1.25, 1.25> }   // "clip" x
  47.       object{UnitBox scale <1.25, 1.51, 1.25> }   // "clip" y
  48.       object{UnitBox scale <1.25, 1.25, 1.51> }   // "clip" z
  49.  
  50.       pigment { red 0.75 green 0.75 blue 0.85 }
  51.       finish {
  52.          ambient 0.2
  53.          diffuse 0.7
  54.          reflection 0.15
  55.          brilliance 8
  56.          specular 1
  57.          roughness 0.01
  58.       }
  59.  
  60.       // Same as radius of glass sphere, not the box!
  61.       bounded_by {object {UnitBox scale 1.75}}
  62.    }
  63.    rotate y*45
  64. }
  65.  
  66. plane { y, -1.5 
  67.    texture {
  68.       Stone1
  69.       pigment {
  70.          octaves 3
  71.          rotate 90*z
  72.       }
  73.       finish { reflection 0.15 }
  74.    }
  75. }
  76. // end of file
  77.