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

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