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

  1. // Persistence Of Vision raytracer version 3.0 sample file.
  2. // Simpler but faster version of Joel NewKirk's GlassBoing animation
  3.  
  4. #include "colors.inc"
  5. global_settings { assumed_gamma 2.2 }
  6.  
  7. #declare xfactor = clock*4
  8. #declare spherey = 5+abs(50*sin((clock)*2*pi))
  9. #switch (xfactor)
  10.     #range(0,1)  // x value cycles from 0 to 1
  11.     #debug "Range A"
  12.         #declare spherex = 50*xfactor
  13.         #break
  14.     #range(1,3)  // x value cycles from 1 to -1
  15.     #debug "Range B"
  16.         #declare spherex = 50*(2-xfactor)
  17.         #break
  18.     #range(3,4)  // x value cycles from -1 back to 0
  19.     #debug "Range C"
  20.         #declare spherex = -50*(4-xfactor)
  21.         #break
  22. #end
  23.  
  24. camera {
  25.     location  <0, 10.5,-100>
  26.     direction <0,  0,   1>
  27.     up        <0,  1,   0>
  28.     right   <4/3,  0,   0>
  29.     look_at <0, 11, 0>
  30. }
  31.  
  32. light_source {<30, 120, 0> colour White
  33.     fade_distance 90
  34.     fade_power 1
  35. }
  36.  
  37. sky_sphere {
  38.     pigment {
  39.         gradient y
  40.         color_map {
  41.             [0.0 Gray50 ]
  42.             [1.0 Gray15 ]
  43.         }
  44.     }
  45. }
  46.  
  47. #declare Brick =
  48. texture {
  49.     pigment { Gray75 }
  50.     finish {
  51.         ambient 0.0
  52.         diffuse 0.8
  53.     }
  54.     scale 6
  55. }
  56.  
  57. plane { x, -60 texture { Brick rotate y*90 }}               // left wall
  58. plane { x, 60 texture { Brick rotate y* 90}}                // right wall
  59. plane { z, 40 texture { Brick }}                            // back wall
  60. plane { y, 0 texture { Brick } translate -y*5 }             // floor
  61.  
  62. sphere { <spherex,spherey, 0>, 10
  63.     texture {
  64.         pigment { White }
  65.         finish { specular 1 roughness 0.001 }
  66.     }
  67. }
  68.  
  69.