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

  1. // Persistence Of Vision raytracer version 3.1 sample scene by Chris Young.
  2. //
  3. // This scene shows the effect of multiple density statements.
  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.     spherical
  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 on the left contains 2 density but one media
  41. // Results are the colors multiply
  42. sphere { 0, 1.5
  43.   pigment { color rgbf<1, 1, 1, 1> }
  44.   finish { ambient 0 diffuse 0 }
  45.   interior { 
  46.     media {
  47.       emission 0.05
  48.       intervals 5
  49.       samples 1, 10
  50.       confidence 0.9999
  51.       variance 1/1000
  52.       density {
  53.         Density1
  54.         translate -y/3
  55.       }
  56.       density {
  57.         Density2
  58.         translate y/3
  59.       }
  60.     } 
  61.   }
  62.   translate -1.25*x
  63.   scale 24 
  64.   hollow 
  65. }
  66.  
  67. // Sphere on the right contains 2 media, each with 1 density
  68. // Results are the colors add.
  69. sphere { 0, 1.5
  70.   pigment { color rgbf<1, 1, 1, 1> }
  71.   finish { ambient 0 diffuse 0 }
  72.   interior { 
  73.     media {
  74.       emission 0.05
  75.       intervals 5
  76.       samples 1, 10
  77.       confidence 0.9999
  78.       variance 1/1000
  79.       density {
  80.         Density1
  81.         translate -y/3
  82.       }
  83.     }
  84.     media {
  85.       emission 0.05
  86.       intervals 5
  87.       samples 1, 10
  88.       confidence 0.9999
  89.       variance 1/1000
  90.       density {
  91.         Density2
  92.         translate y/3
  93.       }
  94.     } 
  95.   }
  96.   translate 1.25*x
  97.   scale 24 
  98.   hollow 
  99. }
  100.  
  101. light_source {
  102.   <500, 600, -500> 
  103.   color White
  104. }
  105.  
  106.