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

  1. // Persistence Of Vision raytracer version 3.1 sample scene by Chris Young.
  2. //
  3. // This scene shows the use of a density_map.
  4. //
  5.  
  6. #include "colors.inc"
  7.  
  8. camera {location  <0, 0, -100>}
  9.  
  10. plane { z, 50
  11.    pigment {checker Yellow, White scale 20}
  12.    finish {ambient 0.2  diffuse 0.8}
  13.    hollow
  14. }
  15.  
  16. // Declare 2 similar density.  Only the color map differs.
  17.  
  18. #declare Density1=
  19.   density {
  20.     spherical
  21.     ramp_wave
  22.     color_map {
  23.       [0.0 color rgb <0.0, 0.0, 0.0>]
  24.       [0.2 color rgb <1.0, 0.3, 0.1>]
  25.       [1.0 color rgb <1.0, 1.0, 0.1>]
  26.     } 
  27.   }
  28.  
  29. #declare Density2=
  30.   density {
  31.     boxed
  32.     ramp_wave
  33.     color_map {
  34.       [0.0 color rgb <0.0, 0.0, 0.0>]
  35.       [0.2 color rgb <0.1, 1.0, 0.3>]
  36.       [1.0 color rgb <0.1, 1.0, 1.0>]
  37.     } 
  38.   }
  39.  
  40. sphere { 0, 2
  41.   pigment { color rgbf<1, 1, 1, 1> }
  42.   finish { ambient 0 diffuse 0 }
  43.   interior { 
  44.     media {
  45.       emission 0.05
  46.       intervals 5
  47.       samples 1, 10
  48.       confidence 0.9999
  49.       variance 1/1000
  50.       density {
  51.         gradient x
  52.         density_map {
  53.           [0.5 Density1]
  54.           [0.5 Density2]
  55.         }
  56.       }
  57.     } 
  58.   }
  59.   scale 24 
  60.   hollow 
  61. }
  62.  
  63. light_source {
  64.   <500, 600, -500> 
  65.   color White
  66. }
  67.  
  68.