home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #7 / amigamamagazinepolishissue1998.iso / varia / povray3 / povray3_fpu / pov3demo / surfaces / spiral1a.pov < prev    next >
Text File  |  1997-12-12  |  3KB  |  172 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 discs 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 = 2.1
  22. #declare Y = 2.1
  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 1 }
  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 1 }
  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 1 }
  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 1 }
  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 1 }
  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 1 }
  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 1 }
  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 1 }
  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 1 }
  141.   scale <S3, S3, S3>
  142. }
  143.  
  144. camera {
  145.   location <0, 0, -6.5>
  146.   right <4/3, 0, 0>
  147.   up <0, 1, 0>
  148.   sky <0, 1, 0>
  149.   direction <0, 0, 1>
  150. }
  151.  
  152. background { color SkyBlue }
  153.  
  154. disc { <0, 0, 0>, <0, 0, 1>, 1 texture { Spiral1 } translate <-1*X, +1*Y, 0> }
  155.  
  156. disc { <0, 0, 0>, <0, 0, 1>, 1 texture { Spiral2 } translate < 0*X, +1*Y, 0> }
  157.  
  158. disc { <0, 0, 0>, <0, 0, 1>, 1 texture { Spiral3 } translate <+1*X, +1*Y, 0> }
  159.  
  160. disc { <0, 0, 0>, <0, 0, 1>, 1 texture { Spiral4 } translate <-1*X,  0*Y, 0> }
  161.  
  162. disc { <0, 0, 0>, <0, 0, 1>, 1 texture { Spiral5 } translate < 0*X,  0*Y, 0> }
  163.  
  164. disc { <0, 0, 0>, <0, 0, 1>, 1 texture { Spiral6 } translate <+1*X,  0*Y, 0> }
  165.  
  166. disc { <0, 0, 0>, <0, 0, 1>, 1 texture { Spiral7 } translate <-1*X, -1*Y, 0> }
  167.  
  168. disc { <0, 0, 0>, <0, 0, 1>, 1 texture { Spiral8 } translate < 0*X, -1*Y, 0> }
  169.  
  170. disc { <0, 0, 0>, <0, 0, 1>, 1 texture { Spiral9 } translate <+1*X, -1*Y, 0> }
  171.  
  172.