home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 4 / DATAFILE_PDCD4.iso / utilities / utilsp / povray / !POVscene / level2 / pov / poolball < prev    next >
Text File  |  1992-09-27  |  3KB  |  133 lines

  1. // Persistence Of Vision raytracer version 1.0 sample file.
  2.  
  3. // By Dan Farmer
  4. // This is a complete rewrite of a scene file that I did a couple of years
  5. // ago.  The original was a real mess... used intersections to do the
  6. // stripes on the balls and had the table and balls set up on the X/Y plane,
  7. // and rotated it on the x-axis to put it horizontal!  This time I did it
  8. // right... used gradients for the stripes and designed things where I wanted
  9. // them in the end.  Much faster with the gradients!
  10. // Added a spotlight, too... new feature in POV-Ray 1.0.
  11.  
  12. #include "shapes"
  13. #include "colors"
  14. #include "textures"
  15.  
  16. // Special re-write of "Shiny" declaration.  Will override textures.inc.
  17. #declare Shiny = texture {
  18.    phong 1 phong_size 200
  19.    reflection 0.25
  20.    ambient 0.15
  21.    diffuse 0.75
  22. }
  23. #include "<POVscene$Dir>.level1.inc.poolball"
  24.  
  25. /* ***************** set up the view & light sources **************************/
  26.  
  27. camera {
  28.    location <0.0  6.0  -15.0>
  29.    direction <0.0 0.0  1.5>
  30.    up  <0.0  1.0  0.0>
  31.    right <1.33333 0.0 0.0>
  32.    look_at <0 -1 0>
  33. }
  34.  
  35. /* Overhead spotlight */
  36. object {
  37.    light_source { <0.0  200.0  -3.0>
  38.       color White
  39.       spotlight
  40.       point_at <0 1 3>
  41.       tightness 800
  42.       radius 8
  43.       falloff 25
  44.    }
  45. }
  46.  
  47. /* ************************** set up the table ********************************/
  48.  
  49. object {     /* Felt table top */
  50.    plane { <0 1 0 > -1 }
  51.    texture { 0.15
  52.       ambient 0.2
  53.       diffuse 0.8
  54.       color MediumForestGreen
  55.    }
  56.    color MediumForestGreen
  57. }
  58.  
  59. /* Cue stick */
  60. object { CueStick
  61.    scale     < 0.15 0.15 1.0 >         /* Skinny and long */
  62.    translate < 0.0  0.0 -7.5 >
  63. }
  64.  
  65. /* Cue Ball */
  66. object {
  67.    sphere { Ball }
  68.    translate < 0.0  0.0 -6.0 >
  69.    texture {
  70.       0.15
  71.       Shiny
  72.       color White
  73.       ambient 0.25
  74.    }
  75.    color White
  76. }
  77.  
  78. /* **************************** set up the balls ********************************/
  79. // (The rotations here are just random values to rotate the stripes)
  80.  
  81. /* Row #1 */
  82. object { _1_Ball
  83. }
  84.  
  85. /* Row #2 */
  86. object { _3_Ball
  87.    translate <1.0  0.0  1.732 >}
  88.  
  89. object { _10_Ball  rotate < 0.0  0.0  -80.0 >
  90.    translate <-1.0  0.0 1.732 >}
  91.  
  92.  
  93. /* Row #3 */
  94. object { _11_Ball  rotate < 45.0  -35.0  -12.0 >
  95.    translate <2.0  0.0  3.464 >}
  96.  
  97. object { _8_Ball
  98.    translate < 0.0  0.0  3.464 >}
  99.  
  100. object { _5_Ball
  101.    translate <-2.0  0.0  3.464 >}
  102.  
  103.  
  104. /* Row #4 */
  105. object { _2_Ball
  106.    translate <-3.0  0.0  5.196 >}
  107.  
  108. object { _7_Ball
  109.    translate <-1.0  0.0  5.196 >}
  110.  
  111. object { _4_Ball
  112.    translate < 1.0  0.0  5.196 >}
  113.  
  114. object { _14_Ball  rotate < 0.0  -15.0  -2.0 >
  115.    translate < 3.0  0.0  5.196 >}
  116.  
  117.  
  118. /* Row #5 */
  119. object { _15_Ball
  120.    translate <-4.0  0.0  6.928 >}
  121.  
  122. object { _13_Ball  rotate < -5.0  11.0  -1.0 >
  123.    translate <-2.0  0.0  6.928 >}
  124.  
  125. object { _9_Ball  rotate < -80.0  -13.0  29.0 >
  126.    translate < 0.0  0.0  6.928 >}
  127.  
  128. object { _12_Ball  rotate < 15.0  15.0  -2.0 >
  129.    translate < 2.0 0.0  6.928 > }
  130.  
  131. object { _6_Ball
  132.    translate < 4.0  0.0  6.928 >}
  133.