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

  1. // Persistence Of Vision raytracer version 1.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.0  20.0  -100.0>
  14.    direction <0.0 0.0  1.0>
  15.    up  <0.0  1.0  0.0>
  16.    right <1.33333 0.0 0.0>
  17. }
  18.  
  19. /* Put down the beloved famous raytrace green/yellow checkered floor */
  20.  
  21. object {
  22.    plane { <0.0 1.0 0.0> -10.0 }
  23.    texture {
  24.       checker colour Yellow colour Green
  25.       scale < 20.0 20.0 20.0 >
  26.       ambient 0.1
  27.       diffuse 0.9
  28.    }
  29.    colour Yellow
  30. }
  31.  
  32. /*
  33.  Now a CBlue Plastic sphere floating in space over the ground - note that no 
  34.  Phong or specular reflection is given.  Any would conflict with the window
  35.  "highlights" by showing that they are not exactly in the mirror direction!
  36. */
  37.  
  38. object {
  39.    sphere { <0.0 25.0 0.0> 40.0 }
  40.    texture {
  41.       colour Blue
  42.       reflection 0.8
  43.       ambient 0.3
  44.       diffuse 0.7
  45.    }
  46.    colour Blue
  47. }
  48.  
  49. /*
  50.  a wall with a window frame to block the light source and cast the shadows
  51. */
  52.  
  53. object {
  54.    union {
  55.       triangle { <-1000.0 -1000.0 0.0> <1000.0 4.0 0.0> <1000.0 -1000.0 0.0> }
  56.       triangle { <-1000.0 -1000.0 0.0> <1000.0 4.0 0.0> <-1000.0 4.0 0.0> }
  57.       triangle { <4.0 4.0 0.0> <-1000.0 21.0 0.0> <-1000.0 4.0 0.0> }
  58.       triangle { <4.0 4.0 0.0> <-1000.0 21.0 0.0> <4.0 21.0 0.0> }
  59.       triangle { <-1000.0 21.0 0.0> <1000.0 1000.0 0.0> <-1000.0 1000.0 0.0> }
  60.       triangle { <-1000.0 21.0 0.0> <1000.0 1000.0 0.0> <1000.0 21.0 0.0> }
  61.       triangle { <1000.0 4.0 0.0> <17.0 21.0 0.0> <1000.0 21.0 0.0> }
  62.       triangle { <1000.0 4.0 0.0> <17.0 21.0 0.0> <17.0 4.0 0.0> }
  63.       triangle { <4.0 12.0 0.0> <17.0 13.0 0.0> <4.0 13.0 0.0> }
  64.       triangle { <4.0 12.0 0.0> <17.0 13.0 0.0> <17.0 12.0 0.0> }
  65.       triangle { <10.0 21.0 0.0> <11.0 4.0 0.0> <11.0 21.0 0.0> }
  66.       triangle { <10.0 21.0 0.0> <11.0 4.0 0.0> <10.0 4.0 0.0> }
  67.    }
  68.    translate <39.0 89.0 -120.0>
  69.    texture {
  70.       colour Black
  71.       ambient 1.0
  72.       diffuse 0.0
  73.    }
  74. }
  75.  
  76. /*
  77.   Now, the 4 actual "panes" to be reflected back onto the sphere for psuedo-
  78.   "highlights".  They are not exactly co-incident with where the actual light
  79.   source is, because they would block the light.  They are very near by where
  80.   the openings are in the black wall above, close enough to give the proper
  81.   illusion.  This is massive cheating, but then, this isn't reality, you see.
  82. */
  83.  
  84. object {
  85.    union {
  86.       triangle { <4.0 21.0 0.0> <10.0 13.0 0.0> <10.0 21.0 0.0> }
  87.       triangle { <4.0 21.0 0.0> <10.0 13.0 0.0> <4.0 13.0 0.0> }
  88.  
  89.       triangle { <11.0 21.0 0.0> <17.0 13.0 0.0> <11.0 13.0 0.0> }
  90.       triangle { <11.0 21.0 0.0> <17.0 13.0 0.0> <17.0 21.0 0.0> }
  91.  
  92.       triangle { <4.0 12.0 0.0> <10.0 4.0 0.0> <4.0 4.0 0.0> }
  93.       triangle { <4.0 12.0 0.0> <10.0 4.0 0.0> <10.0 12.0 0.0> }
  94.  
  95.       triangle { <11.0 12.0 0.0> <17.0 4.0 0.0> <11.0 4.0 0.0> }
  96.       triangle { <11.0 12.0 0.0> <17.0 4.0 0.0> <17.0 12.0 0.0> }
  97.    }
  98.    scale <15.0 15.0 15.0>
  99.    translate <20.0 90.0 -100.0>
  100.    texture {
  101.       colour White
  102.       ambient 1.0
  103.       diffuse 0.0
  104.    }
  105. }
  106.  
  107.  
  108. /* a Light above the sphere, behind the camera and window frame for shadows */
  109.  
  110. object {
  111.    light_source { <50.0 111.0 -130.0>
  112.       colour White
  113.    }
  114. }
  115.