home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #7 / amigamamagazinepolishissue1998.iso / varia / povray3 / povray3_fpu / pov3demo / surfaces / spiral1b.pov < prev    next >
Text File  |  1997-12-12  |  4KB  |  218 lines

  1. // Persistence Of Vision raytracer version 3.0 sample file.
  2. // Demo using the spiral1 texture ... by Dieter Bayer, May 1994
  3. //
  4. // 9 cylinders with different spiral1 textures.
  5. //
  6. // The scaling factor of the texture, i.e. the number of turns
  7. // one "arm" of the spiral makes, decreases from left to right.
  8. //
  9. // The number of arms of the spiral,
  10. // increases from top to bottom.
  11. //
  12.  
  13. #version 3.0
  14. global_settings { assumed_gamma 2.2 }
  15.  
  16. #include "colors.inc"
  17. #include "shapes.inc"
  18.  
  19. /* factors used for positioning the discs */
  20.  
  21. #declare X = 3
  22. #declare Z = 3
  23.  
  24. /* arms used */
  25.  
  26. #declare O1 = 3
  27. #declare O2 = 6
  28. #declare O3 = 9
  29.  
  30. /* scaling used */
  31.  
  32. #declare S1 = 100
  33. #declare S2 = 1
  34. #declare S3 = 0.2
  35.  
  36. /* Spiral 1 */
  37.  
  38. #declare Spiral1 =
  39. texture {
  40.   pigment {
  41.     spiral1 O1
  42.     color_map { [0.0, 1.0  color Red color Green] }
  43.   }
  44.   finish { ambient 0.3 diffuse 0.5 phong 0.5 phong_size 20 }
  45.   scale <S1, S1, S1>
  46. }
  47.  
  48. /* Spiral 2 */
  49.  
  50. #declare Spiral2 =
  51. texture {
  52.   pigment {
  53.     spiral1 O1
  54.     color_map { [0.0, 1.0  color Red color Green] }
  55.   }
  56.   finish { ambient 0.3 diffuse 0.5 phong 0.5 phong_size 20 }
  57.   scale <S2, S2, S2>
  58. }
  59.  
  60. /* Spiral 3 */
  61.  
  62. #declare Spiral3 =
  63. texture {
  64.   pigment {
  65.     spiral1 O1
  66.     color_map { [0.0, 1.0  color Red color Green] }
  67.   }
  68.   finish { ambient 0.3 diffuse 0.5 phong 0.5 phong_size 20 }
  69.   scale <S3, S3, S3>
  70. }
  71.  
  72. /* Spiral 4 */
  73.  
  74. #declare Spiral4 =
  75. texture {
  76.   pigment {
  77.     spiral1 O2
  78.     color_map { [0.0, 1.0  color Red color Green] }
  79.   }
  80.   finish { ambient 0.3 diffuse 0.5 phong 0.5 phong_size 20 }
  81.   scale <S1, S1, S1>
  82. }
  83.  
  84. /* Spiral 5 */
  85.  
  86. #declare Spiral5 =
  87. texture {
  88.   pigment {
  89.     spiral1 O2
  90.     color_map { [0.0, 1.0  color Red color Green] }
  91.   }
  92.   finish { ambient 0.3 diffuse 0.5 phong 0.5 phong_size 20 }
  93.   scale <S2, S2, S2>
  94. }
  95.  
  96. /* Spiral 6 */
  97.  
  98. #declare Spiral6 =
  99. texture {
  100.   pigment {
  101.     spiral1 O2
  102.     color_map { [0.0, 1.0  color Red color Green] }
  103.   }
  104.   finish { ambient 0.3 diffuse 0.5 phong 0.5 phong_size 20 }
  105.   scale <S3, S3, S3>
  106. }
  107.  
  108. /* Spiral 7 */
  109.  
  110. #declare Spiral7 =
  111. texture {
  112.   pigment {
  113.     spiral1 O3
  114.     color_map { [0.0, 1.0  color Red color Green] }
  115.   }
  116.   finish { ambient 0.3 diffuse 0.5 phong 0.5 phong_size 20 }
  117.   scale <S1, S1, S1>
  118. }
  119.  
  120. /* Spiral 8 */
  121.  
  122. #declare Spiral8 =
  123. texture {
  124.   pigment {
  125.     spiral1 O3
  126.     color_map { [0.0, 1.0  color Red color Green] }
  127.   }
  128.   finish { ambient 0.3 diffuse 0.5 phong 0.5 phong_size 20 }
  129.   scale <S2, S2, S2>
  130. }
  131.  
  132. /* Spiral 9 */
  133.  
  134. #declare Spiral9 =
  135. texture {
  136.   pigment {
  137.     spiral1 O3
  138.     color_map { [0.0, 1.0  color Red color Green] }
  139.   }
  140.   finish { ambient 0.3 diffuse 0.5 phong 0.5 phong_size 20 }
  141.   scale <S3, S3, S3>
  142. }
  143.  
  144. camera {
  145.   location <10, 10, -20>
  146.   right <4/3, 0, 0>
  147.   up <0, 1, 0>
  148.   sky <0, 1, 0>
  149.   direction <0, 0, 2.8>
  150.   look_at <0, 0, 0>
  151. }
  152.  
  153. background { color SkyBlue }
  154.  
  155. light_source { <15, 15, -20> colour Gray30 }
  156.  
  157. light_source { <-10, 50, -10> colour Gray30 }
  158.  
  159. light_source { <0, 50, 0> colour Gray30 }
  160.  
  161. plane { y, 0
  162.   pigment {
  163.     checker colour Yellow colour Green
  164.     scale 5
  165.   }
  166.   finish {
  167.     ambient 0.2
  168.     diffuse 0.8
  169.   }
  170. }
  171.  
  172. cylinder { -y, y, 1 
  173.   texture { Spiral1 rotate 90*x } 
  174.   translate <-1*X, 1, +1*Z> 
  175. }
  176.  
  177. cylinder { -y, y, 1 
  178.   texture { Spiral2 rotate 90*x } 
  179.   translate <0*X, 1, +1*Z> 
  180. }
  181.  
  182. cylinder { -y, y, 1 
  183.   texture { Spiral3 rotate 90*x } 
  184.   translate <1*X, 1, +1*Z> 
  185. }
  186.  
  187. cylinder { -y, y, 1 
  188.   texture { Spiral4 rotate 90*x } 
  189.   translate <-1*X, 1, 0*Z> 
  190. }
  191.  
  192. cylinder { -y, y, 1 
  193.   texture { Spiral5 rotate 90*x } 
  194.   translate <0*X, 1, 0*Z> 
  195. }
  196.  
  197. cylinder { -y, y, 1 
  198.   texture { Spiral6 rotate 90*x } 
  199.   translate <1*X, 1, 0*Z> 
  200. }
  201.  
  202. cylinder { -y, y, 1 
  203.   texture { Spiral7 rotate 90*x } 
  204.   translate <-1*X, 1, -1*Z> 
  205. }
  206.  
  207. cylinder { -y, y, 1 
  208.   texture { Spiral8 rotate 90*x } 
  209.   translate <0*X, 1, -1*Z> 
  210. }
  211.  
  212. cylinder { -y, y, 1 
  213.   texture { Spiral9 rotate 90*x } 
  214.   translate <1*X, 1, -1*Z> 
  215. }
  216.  
  217.  
  218.