home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 13 Bitmap / 13-Bitmap.zip / povscn.zip / scenes / level1 / window.pov < prev   
Text File  |  1993-09-28  |  3KB  |  94 lines

  1. // Persistence Of Vision raytracer version 2.0 sample file.
  2.  
  3. // By Aaron a. Collins
  4.  
  5. /* Window Highlighting Scene by Aaron a. Collins */
  6. /* This file is hereby released to the public domain. */
  7.  
  8. #include "colors.inc"
  9.  
  10. /* Someone to take in the breathtaking view... */
  11.  
  12. camera {
  13.    location  <0, 20, -100>
  14.    direction <0,  0,    1>
  15.    up        <0,  1,    0>
  16.    right   <4/3,  0,    0>
  17. }
  18.  
  19. /* Put down the beloved famous raytrace green/yellow checkered floor */
  20.  
  21. plane { y, -10
  22.    pigment {
  23.       checker colour Yellow colour Green
  24.       scale 20
  25.    }
  26.    finish {ambient 0.1 diffuse 0.9}
  27. }
  28.  
  29. /*
  30.  Now a CBlue Plastic sphere floating in space over the ground - note that no 
  31.  Phong or specular reflection is given.  Any would conflict with the window
  32.  "highlights" by showing that they are not exactly in the mirror direction!
  33. */
  34.  
  35. sphere { <0, 25, 0>, 40
  36.    pigment {Blue}
  37.    finish {reflection 0.8 ambient 0.3 diffuse 0.7}
  38. }
  39.  
  40. /*
  41.  a wall with a window frame to block the light source and cast the shadows
  42. */
  43.  
  44. union {
  45.    triangle { <-1000, -1000, 0>, <1000, 4, 0>, <1000, -1000, 0>}
  46.    triangle { <-1000, -1000, 0>, <1000, 4, 0>, <-1000, 4, 0>}
  47.    triangle { <4, 4, 0>, <-1000, 21, 0>, <-1000, 4, 0>}
  48.    triangle { <4, 4, 0>, <-1000, 21, 0>, <4, 21, 0>}
  49.    triangle { <-1000, 21, 0>, <1000, 1000, 0>, <-1000, 1000, 0>}
  50.    triangle { <-1000, 21, 0>, <1000, 1000, 0>, <1000, 21, 0>}
  51.    triangle { <1000, 4, 0>, <17, 21, 0>, <1000, 21, 0>}
  52.    triangle { <1000, 4, 0>, <17, 21, 0>, <17, 4, 0>}
  53.    triangle { <4, 12, 0>, <17, 13, 0>, <4, 13, 0>}
  54.    triangle { <4, 12, 0>, <17, 13, 0>, <17, 12, 0>}
  55.    triangle { <10, 21, 0>, <11, 4, 0>, <11, 21, 0>}
  56.    triangle { <10, 21, 0>, <11, 4, 0>, <10, 4, 0>}
  57.    translate <39, 89, -120>
  58.  
  59.    pigment {Black}
  60.    finish {ambient 1 diffuse 0}
  61. }
  62.  
  63. /*
  64.   Now, the 4 actual "panes" to be reflected back onto the sphere for psuedo-
  65.   "highlights".  They are not exactly co-incident with where the actual light
  66.   source is, because they would block the light.  They are very near by where
  67.   the openings are in the black wall above, close enough to give the proper
  68.   illusion.  This is massive cheating, but then, this isn't reality, you see.
  69. */
  70.  
  71. union {
  72.    triangle { <4, 21, 0>, <10, 13, 0>, <10, 21, 0>}
  73.    triangle { <4, 21, 0>, <10, 13, 0>, <4, 13, 0>}
  74.  
  75.    triangle { <11, 21, 0>, <17, 13, 0>, <11, 13, 0>}
  76.    triangle { <11, 21, 0>, <17, 13, 0>, <17, 21, 0>}
  77.  
  78.    triangle { <4, 12, 0>, <10, 4, 0>, <4, 4, 0>}
  79.    triangle { <4, 12, 0>, <10, 4, 0>, <10, 12, 0>}
  80.  
  81.    triangle { <11, 12, 0>, <17, 4, 0>, <11, 4, 0>}
  82.    triangle { <11, 12, 0>, <17, 4, 0>, <17, 12, 0>}
  83.    scale 15
  84.    translate <20, 90, -100>
  85.  
  86.    pigment {White}
  87.    finish {ambient 1 diffuse 0}
  88. }
  89.  
  90.  
  91. /* a Light above the sphere, behind the camera and window frame for shadows */
  92.  
  93. light_source {<50, 111, -130> colour White}
  94.