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

  1. // Persistence Of Vision raytracer version 3.1 sample scene by Dieter Bayer.
  2. //
  3. // This scene shows the effect of solid vs. hollow objects.
  4. //
  5. // Both spheres in this scene are enclosed by a halo container object.
  6. //
  7. // The left sphere is solid, i.e. it's not filled with the halo.
  8. // The right sphere is hollow, i.e. it's filled with the halo.
  9. //
  10. // Note that you can see some discontinuities in the halo of the 
  11. // right sphere. This is caused be the refraction. After the rays
  12. // are bent they travel through the halo on a different path
  13. // resulting in a different result than that for an unbend ray,
  14. // which would show no discontinuities.
  15. //
  16.  
  17. #global_settings { assumed_gamma 2.2 }
  18.  
  19. #include "colors.inc"
  20.  
  21. camera {
  22.    location  <0, 20, -100>
  23.    direction <0,  0,    1>
  24.    up        <0,  1,    0>
  25.    right   <4/3,  0,    0>
  26. }
  27.  
  28. //
  29. // Put down the beloved famous raytrace blue/green checkered floor
  30. //
  31.  
  32. plane { y, -10
  33.    pigment {
  34.       checker Blue, Green
  35.       scale 20
  36.    }
  37.    finish {
  38.       ambient 0.2
  39.       diffuse 0.8
  40.    }
  41.    hollow
  42. }
  43.  
  44. //
  45. // Use beloved famous raytrace blue/green checkered wall
  46. //
  47.  
  48. plane { z, 50
  49.    pigment {
  50.       checker Blue, Green
  51.       scale 20
  52.    }
  53.    finish {
  54.       ambient 0.2
  55.       diffuse 0.8
  56.    }
  57.    hollow
  58. }
  59.  
  60. //
  61. // Declare media.
  62. //
  63.  
  64. #declare Media = media {
  65.   emission 0.05
  66.   intervals 5
  67.   samples 1, 10
  68.   confidence 0.9999
  69.   variance 1/1000
  70.   density {
  71.     spherical
  72.     ramp_wave
  73.     turbulence 0.1
  74.     color_map {
  75.       [0.0 color rgb <0, 0, 0>]
  76.       [0.1 color rgb <1, 0, 0>]
  77.       [1.0 color rgb <1, 1, 0>]
  78.     } 
  79.   }
  80.  
  81. //
  82. // Solid, translucent sphere enclosed by halo.
  83. //
  84.  
  85. sphere { <-29, 20, 0>, 25
  86.   pigment { rgbt<1, 1, 1, 0.9> }
  87.   finish {
  88.     ambient 0.0
  89.     diffuse 0.0
  90.     phong 1.0
  91.     phong_size 200
  92.   }
  93.   interior { ior 1.1 }
  94.   hollow no
  95. }
  96.  
  97. sphere { 0, 1 
  98.   pigment { color rgbf<1, 1, 1, 1> }
  99.   finish { ambient 0 diffuse 0 }
  100.   interior { media { Media } }
  101.   scale 28 
  102.   translate <-29, 20, 0> 
  103.   hollow 
  104. }
  105.  
  106. //
  107. // Hollow, translucent sphere enclosed by halo.
  108. //
  109.  
  110. sphere { <29, 20, 0>, 25
  111.   pigment { rgbt<1, 1, 1, 0.9> }
  112.   finish {
  113.     ambient 0.0
  114.     diffuse 0.0
  115.     phong 1.0
  116.     phong_size 200
  117.   }
  118.   interior { ior 1.1 }
  119.   hollow yes
  120. }
  121.  
  122. sphere { 0, 1 
  123.   pigment { color rgbf<1, 1, 1, 1> }
  124.   finish { ambient 0 diffuse 0 }
  125.   interior { media { Media } }
  126.   scale 28 
  127.   translate <29, 20, 0> 
  128.   hollow 
  129. }
  130.  
  131. //
  132. // Cast some light.
  133. //
  134.  
  135. light_source {
  136.   <500, 600, -200> 
  137.   color White
  138. }
  139.  
  140.