home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 22 / PC Actual CD 22.iso / SHARE / prog / POVRAY / EXPLODE.ZIP / MOON.POV < prev    next >
Encoding:
Text File  |  1997-03-10  |  2.3 KB  |  67 lines

  1. // OBJECT EXPLODER: EXPLODING MOON ANIMATION
  2. // *****************************************
  3. // This animation shows a moon exploding into a number of asteroids.
  4. // Note: to preserve the starfield background this animation should NOT
  5. //       be rendered with anti-aliasing enabled.
  6.  
  7. // CAMERA AND LIGHTS
  8.    camera {location <0, 0, -7> look_at <0, 0, 0>}
  9.    light_source {<10, 10, -50> rgb <1, 1, 1>}
  10.  
  11. // BACKGROUND
  12.    sky_sphere {pigment {granite color_map {
  13.       [0 rgb <.5, .7, 1>] [.1 rgb <0, 0, 0>]
  14.       [.8 rgb <0, 0, 0>] [1 rgb <1, 1, 1>]}
  15.       scale .01}}
  16.  
  17. // SCENE DEFINITIONS
  18.    #declare Moon = sphere {<0, 0, 0>, 1
  19.       pigment {bozo color_map {[0 rgb .4] [1 rgb .8]} scale .4}
  20.       normal {bump_map {gif "map.gif" map_type 1 interpolate 2} bump_size 3}}
  21.  
  22. // ROTATE MOON FOR FIRST PART OF ANIMATION
  23.    #switch (clock)
  24.       #range (0, .25)
  25.          object {Moon rotate y * clock * 120 rotate z * -20}
  26.          #break
  27.  
  28. // EXPLOSION PARAMETERS
  29.    #else
  30.       #declare explode_clock = (clock - .25) * 4 / 3
  31.       #declare explode_object = object {Moon rotate <0, 30, -20>}
  32.       #declare object_centre = <0, 0, 0>
  33.       #declare object_size = <2, 2, 2>
  34.       #declare object_hollow = false
  35.       #declare particle_object = sphere {<0,0,0>, .75}
  36.       #declare particle_res = <4, 4, 4>
  37.       #declare particle_texture = texture {
  38.          pigment {bozo color_map {[0 rgb .4] [1 rgb .8]} scale .3}
  39.          normal {bumps 2 scale .1}}
  40.       #declare exp_location = <0, 0, 0>
  41.       #declare exp_strength = 8
  42.       #declare exp_spin = 1
  43.       #declare exp_seed = 87632
  44.       #declare exp_turb = 1
  45.       #declare scale_turb = .5
  46.       #declare rotate_turb = 1
  47.       #declare vel_turb = .3
  48.       #declare dir_turb = .4
  49.       #declare spin_turb = .3
  50.  
  51. // CREATE EXPLODING MOON
  52.       #include "Explode.inc"
  53.  
  54. // CREATE FIREBALL
  55.       #declare FClock = pow (explode_clock, .8)
  56.       disc {<0,0,0>, z, 1.5
  57.          pigment {onion color_map {
  58.             [0 rgbt <1 - (FClock * .5), 1 - (FClock * .5), .5, .4 + (FClock * .6)>]
  59.             [.25 rgbt <1 - (FClock * .5), .5, FClock * .5, 1>]}
  60.             scale 3
  61.             warp {turbulence -FClock * .5 octaves 3 lambda 3}
  62.             rotate FClock*30}
  63.          finish {ambient 3 diffuse 0}
  64.          no_shadow hollow
  65.          scale 1 + (FClock * 8)}
  66.    #end
  67.