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

  1. // Persistence Of Vision raytracer version 3.0 sample file.
  2. // Distance based attenuation in translucent objects example
  3.  
  4. #version 3.0
  5. global_settings { assumed_gamma 2.2 }
  6.  
  7. #include "colors.inc"
  8.  
  9. #declare IOR = 1.05
  10. #declare Distance = 20
  11.  
  12. #declare Col1 = -15
  13. #declare Col2 =  35
  14. #declare Row1 =  25
  15. #declare Row2 = -5 
  16.  
  17. camera {
  18.   orthographic
  19.   location <0, 0, -100>
  20.   right 80 * 4/3 * x
  21.   up    80 * y
  22.   look_at <0, 0, 0>
  23. }
  24.  
  25. //
  26. // Use beloved famous raytrace green/yellow checkered wall
  27. //
  28.  
  29. plane { z, 20
  30.    pigment {
  31.       checker colour Yellow colour Green
  32.       scale 4
  33.    }
  34.    finish {
  35.       ambient 0.2
  36.       diffuse 0.8
  37.    }
  38. }
  39.  
  40. //
  41. // Translucent sphere without attenuation
  42. //
  43.  
  44. sphere { <Col1, Row1, 0>, 10
  45.    pigment { rgbt<1, 1, 1, 0.9> }
  46.    finish {
  47.       ambient 0
  48.       diffuse 0
  49.       refraction 1
  50.       ior IOR
  51.       phong 1
  52.       phong_size 200
  53.       fade_distance Distance
  54.       fade_power 0
  55.    }
  56. }
  57.  
  58. //
  59. // Translucent sphere with linear attenuation
  60. //
  61.  
  62. sphere { <Col2, Row1, 0>, 10
  63.    pigment { rgbt<1, 1, 1, 0.9> }
  64.    finish {
  65.       ambient 0
  66.       diffuse 0
  67.       refraction 1
  68.       ior IOR
  69.       phong 1
  70.       phong_size 200
  71.       fade_distance Distance
  72.       fade_power 1
  73.    }
  74. }
  75.  
  76. //
  77. // Translucent sphere with quadratic attenuation
  78. //
  79.  
  80. sphere { <Col1, Row2, 0>, 10
  81.    pigment { rgbt<1, 1, 1, 0.9> }
  82.    finish {
  83.       ambient 0
  84.       diffuse 0
  85.       refraction 1
  86.       ior IOR
  87.       phong 1
  88.       phong_size 200
  89.       fade_distance Distance
  90.       fade_power 2
  91.    }
  92. }
  93.  
  94. //
  95. // Translucent sphere with cubic attenuation
  96. //
  97.  
  98. sphere { <Col2, Row2, 0>, 10
  99.    pigment { rgbt<1, 1, 1, 0.9> }
  100.    finish {
  101.       ambient 0
  102.       diffuse 0
  103.       refraction 1
  104.       ior IOR
  105.       phong 1
  106.       phong_size 200
  107.       fade_distance Distance
  108.       fade_power 3
  109.    }
  110. }
  111.  
  112. //
  113. // Due to the atmospheric attenuation and the large distance to
  114. // the light source it has to be very bright.
  115. //
  116.  
  117. light_source { <10000, 10000, -10000> colour White }
  118.  
  119.