home *** CD-ROM | disk | FTP | other *** search
/ Shareware Supreme Volume 6 #1 / swsii.zip / swsii / 279 / POVSCN20.ZIP / POOLBALL.POV < prev    next >
Text File  |  1993-09-28  |  3KB  |  150 lines

  1. // Persistence Of Vision raytracer version 2.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.inc"
  13. #include "colors.inc"
  14. #include "textures.inc"
  15.  
  16. // Special re-write of "Shiny" declaration.  Will override textures.inc.
  17. #declare Shiny = finish {
  18.    phong 1
  19.    phong_size 200
  20.    reflection 0.25
  21.    ambient 0.15
  22.    diffuse 0.75
  23. }
  24.  
  25. #include "poolball.inc"
  26.  
  27. /* ***************** set up the view & light sources **************************/
  28.  
  29. camera {
  30.    location <0.0, 6.0, -15.0>
  31.    direction <0.0, 0.0, 1.5>
  32.    up  <0.0, 1.0, 0.0>
  33.    right <4/3, 0.0, 0.0>
  34.    look_at <0, -1, 0>
  35. }
  36.  
  37. /* Overhead spotlight */
  38. light_source {
  39.     <0.0, 200.0, -3.0> color White
  40.     spotlight
  41.     point_at <0, 1, 3>
  42.     tightness 800
  43.     radius 8
  44.     falloff 25
  45. }
  46.  
  47. /* ************************** set up the table ********************************/
  48.  
  49. /* Felt table top */
  50. plane { y, -1
  51.    finish {
  52.       crand 0.15
  53.       ambient 0.2
  54.       diffuse 0.8
  55.    }
  56.    pigment { MediumForestGreen }
  57. }
  58.  
  59. /* Cue stick */
  60. object { CueStick
  61.    scale  <0.15, 0.15, 1.0>         /* Skinny and long */
  62.    translate -7.5*z
  63. }
  64.  
  65. /* Cue Ball */
  66. object { Ball
  67.    pigment { White }
  68.    finish {
  69.       Shiny
  70.       crand 0.15
  71.       ambient 0.25
  72.    }
  73.  
  74.    translate -6*z
  75. }
  76.  
  77. /* **************************** set up the balls ********************************/
  78. // (The rotations here are just random values to rotate the stripes)
  79.  
  80. /* Row #1 */
  81. object { _1_Ball }
  82.  
  83. /* Row #2 */
  84. object { _3_Ball
  85.    translate <1.0, 0.0, 1.732>
  86. }
  87.  
  88. object { _10_Ball
  89.    rotate <0.0, 0.0, -80>
  90.    translate <-1.0, 0.0, 1.732>
  91. }
  92.  
  93. /* Row #3 */
  94. object { _11_Ball
  95.    rotate <45.0, -35.0, -12.0>
  96.    translate <2.0, 0.0, 3.464>
  97. }
  98.  
  99. object { _8_Ball
  100.    translate <0.0, 0.0, 3.464>
  101. }
  102.  
  103. object { _5_Ball
  104.    translate <-2.0, 0.0, 3.464 >
  105. }
  106.  
  107.  
  108. /* Row #4 */
  109. object { _2_Ball
  110.    translate <-3.0, 0.0, 5.196 >
  111. }
  112.  
  113. object { _7_Ball
  114.    translate <-1.0, 0.0, 5.196 >
  115. }
  116.  
  117. object { _4_Ball
  118.    translate <1.0, 0.0, 5.196 >
  119. }
  120.  
  121. object { _14_Ball
  122.    rotate <0.0, -15.0, -2.0>
  123.    translate <3.0, 0.0, 5.196 >
  124. }
  125.  
  126.  
  127. /* Row #5 */
  128. object { _15_Ball
  129.    translate <-4.0, 0.0, 6.928 >
  130. }
  131.  
  132. object { _13_Ball
  133.    rotate <-5.0, 11.0, -1.0>
  134.    translate <-2.0, 0.0, 6.928 >
  135. }
  136.  
  137. object { _9_Ball
  138.    rotate <-80.0, -13.0, 29.0>
  139.    translate <0.0, 0.0, 6.928 >
  140. }
  141.  
  142. object { _12_Ball
  143.    rotate <15.0, 15.0, -2.0>
  144.    translate <2.0, 0.0, 6.928>
  145. }
  146.  
  147. object { _6_Ball
  148.    translate <4.0, 0.0, 6.928>
  149. }
  150.