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

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