home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 1995 January / pcw-0195.iso / polyray / dat / animate / particle / part1.pi next >
Encoding:
Text File  |  1994-12-31  |  942 b   |  45 lines

  1. // Simple particle system
  2. // Polyray input file: Alexander Enzmann
  3.  
  4. frame_time 0.1
  5. start_frame 0
  6. end_frame 41
  7. total_frames 42
  8.  
  9. // Set up the camera
  10. viewpoint {
  11.    from <0,5,-8>
  12.    at <0,2,0>
  13.    up <0,1,0>
  14.    angle 40
  15.    resolution 80, 40
  16.    aspect 2
  17.    }
  18.  
  19. background <0, 0, 0>
  20. light <-10, 30, -20>
  21. include "../../colors.inc"
  22.  
  23. define asphere object { sphere <0, 0, 0>, 0.5 shiny_red }
  24. define bsphere object { sphere <0, 0, 0>, 0.5 shiny_green }
  25. define csphere object { sphere <0, 0, 0>, 0.5 shiny_yellow }
  26. define dsphere object { sphere <0, 0, 0>, 0.5 shiny_blue }
  27.  
  28. // The force of gravity
  29. define gravity <0, -1, 0>
  30.  
  31. if (frame == start_frame)
  32. particle {
  33.    position <-5, 0.0, 0>
  34.    velocity <2, 2, 0>
  35.    acceleration gravity
  36.    object (u < 1 ? "asphere" :
  37.          (u < 2 ? "bsphere" :
  38.             (u < 3 ? "csphere" : "dsphere")))
  39.    }
  40.  
  41. object {
  42.    box <-10, -0.1, -10>, <10, 0, 10>
  43.    matte_yellow
  44.    }
  45.