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

  1. // OBJECT EXPLODER: LOGO ANIMATION
  2. // *******************************
  3. // This animation illustrates how a backwards explode_clock can be used
  4. // to create an anti-explosion (the particles come together to form the
  5. // original object).
  6.  
  7. // CAMERA AND LIGHTS
  8.    camera {location <-5, -5, -30> look_at <0, 0, 0> angle 50}
  9.    light_source {<10, 20, -50> rgb 1}
  10.    light_source {<-20, -10, -20> rgb 1}
  11.  
  12. // BACKGROUND
  13.    plane {-z, 0
  14.       pigment {rgb 0}
  15.       normal {waves .1 scale 10 frequency 10 phase -clock}
  16.       finish {reflection .4 phong .1 phong_size 3 ambient 1 diffuse 0}
  17.       translate z * 20}
  18.  
  19. // EXPLOSION PARAMETERS
  20.    #declare explode_object = union {
  21.       box {<-3, -4, -1>, <-1, 4, 1>}
  22.       difference {
  23.          cylinder {-z, z, 1 scale <3.5, 2, 1> translate <-1, 0, 0>}
  24.          cylinder {-z, z, 1 scale <2, 1.9, 1.1> translate <-1, 0, 0>}
  25.          clipped_by {box {<-1.1, -2.1, -1.1>, <3.1, 2.1, 1.1>}}
  26.          translate y*2}
  27.       difference {
  28.          cylinder {-z, z, 1 scale <4, 2, 1> translate <-1, 0, 0>}
  29.          cylinder {-z, z, 1 scale <2.5, 1.9, 1.1> translate <-1, 0, 0>}
  30.          clipped_by {box {<-1.1, -2.1, -1.1>, <3.1, 2.1, 1.1>}}
  31.          translate -y*2}
  32.       pigment {gradient y
  33.          color_map {[0 rgb <.2, 0, .3>] [1 rgb <1, 0, .8>]}
  34.          translate y * -.5 scale 8.5}
  35.       normal {waves .5 scale 3 frequency 10 phase -clock * 2}
  36.       finish {phong .3 phong_size 5}}
  37.    #declare explode_clock = 1 - (pow (clock, .6) * 1.3)
  38.    #declare object_centre = <0, 0, 0>
  39.    #declare object_size = <6, 8, 2>
  40.    #declare particle_res = <3, 4, 2>
  41.    #declare exp_turb = 1
  42.    #declare scale_turb = explode_clock * .5
  43.    #declare rotate_turb = explode_clock
  44.    #declare vel_turb = .1
  45.    #declare dir_turb = 0
  46.  
  47. // CREATE ANTI-EXPLOSION
  48.    object {
  49.       #include "Explode.inc"
  50.       rotate y * (explode_clock + .3) * 360}
  51.