home *** CD-ROM | disk | FTP | other *** search
/ ANews 3 / AnewsCD3.iso / atari / GRAPHX / POV / 68030.060 / POV31G30 / POVRAY_3.1G / SCENES / ANIMATE / BOING / GLSBNG.POV < prev   
Text File  |  1999-10-30  |  2KB  |  77 lines

  1. // Persistence Of Vision raytracer version 3.1 sample file.
  2. // GlassBoing animation by Joel NewKirk
  3.  
  4. #include "glass.inc"
  5. #include "colors.inc"
  6. global_settings { assumed_gamma 2.2 }
  7.  
  8. #declare xfactor = clock*4;
  9. #declare spherey = 5+abs(50*sin((clock)*2*pi));
  10. #switch (xfactor)
  11.     #range(0,1)  // x value cycles from 0 to 1
  12.     #debug "Range A"
  13.         #declare spherex = 50*xfactor;
  14.         #break
  15.     #range(1,3)  // x value cycles from 1 to -1
  16.     #debug "Range B"
  17.         #declare spherex = 50*(2-xfactor);
  18.         #break
  19.     #range(3,4)  // x value cycles from -1 back to 0
  20.     #debug "Range C"
  21.         #declare spherex = -50*(4-xfactor);
  22.         #break
  23. #end
  24.  
  25. camera {
  26.     location  <0, 10.5,-100>
  27.     direction <0,  0,   1>
  28.     up        <0,  1,   0>
  29.     right   <4/3,  0,   0>
  30.     look_at <0, 11, 0>
  31. }
  32.  
  33. light_source {<30, 120, 0> colour White
  34.     fade_distance 90
  35.     fade_power 1
  36. }
  37.  
  38. sky_sphere {
  39.      pigment {
  40.         gradient y
  41.         color_map {
  42.             [0.0 Gray50 ]
  43.             [1.0 Gray15 ]
  44.         }
  45.     }
  46. }
  47.  
  48. #declare Brick =
  49. texture {
  50.     pigment { brick Gray80, rgb<0.65, 0.3, 0.25> brick_size <3,1,2> mortar 0.15 }
  51.     normal { brick -10 brick_size <3,1,2> mortar 0.175 ramp_wave}
  52.     finish {
  53.         ambient 0.0
  54.         diffuse 0.8
  55.     }
  56.     scale 6
  57. }
  58.  
  59. plane { x,-60 texture { Brick rotate y*90 }}               // left wall
  60. plane { x, 60 hollow on texture { Brick rotate y* 90}}                // right wall
  61. plane { z, 40 hollow on texture { Brick }}                            // back wall
  62. plane { y, 0 texture { Brick } translate -y*5 }             // floor
  63.  
  64. sphere { <spherex,spherey, 0>, 10
  65.     texture {
  66.         pigment { White filter 0.95}
  67.         finish { F_Glass3 }
  68.     }
  69.         interior{I_Glass
  70.             caustics 1
  71. //             fade_distance 30
  72. //             fade_power 1
  73.         }
  74.  
  75. }
  76.  
  77.