home *** CD-ROM | disk | FTP | other *** search
/ ANews 3 / AnewsCD3.iso / atari / GRAPHX / POV / 68030.060 / POV31G30 / POVRAY_3.1G / SCENES / INTERIOR / ATTEN1.POV next >
Text File  |  1999-10-30  |  2KB  |  119 lines

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