home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #7 / amigamamagazinepolishissue1998.iso / varia / povray3 / povray3_fpu / pov3demo / anim / boing / glsbng.pov < prev   
Text File  |  1997-12-12  |  2KB  |  76 lines

  1. // Persistence Of Vision raytracer version 3.0 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 texture { Brick rotate y* 90}}                // right wall
  61. plane { z, 40 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 {
  68.             F_Glass3
  69.             caustics 1
  70. //             fade_distance 30
  71. //             fade_power 1
  72.         }
  73.     }
  74. }
  75.  
  76.