Assignment 2: Simulating Particle Systems
DUE: 5/18/98

Introduction

In this assignment, you will simulate a set of point-mass particles to create an animation. You should include at least one example of *each* of the following techniques (discussed in class):

  • Positioning particles on surface geometry
  • Applying a force field to the particles
  • Bouncing the particles off a plane (or other surface)

    Each of these parts are discussed in detail below. Your simulation will be visualized using Inventor graphics on the SGI platform. A program stub that draws particles (spheres) in Inventor and captures images is available in: /net/hg27/animation/class/particles/. This program is well documented and includes a command line option to read in an arbitrary 3D model in Wavefront format. A small set of Wavefront models are included in the directory with the program.

    Positioning particles on a surface

    This technique was seen in class in Karl Sims' piece "Particle Dreams." This piece included a scene where particles were positioned on the surface of a head. Your simulation may use this surface positioning as initial conditions for the particles or as an intermediate or final position for the particles.

    We have provided a number of example surface models. These models can be read into a database by the program stub using the model filename as a command line argument. The database will contain positions for all of the vertices in the model and can be queried.

    In Sims' piece, the head positioning was used as initial condition for an animation where the particles "blew" out of the mouth of the head in a vortex effect. Feel free to experiment with this type of technique or try your own ideas.

    Applying a force field

    In this assignment, we use the term "force field" to mean any of a number of operations that apply an acceleration (A = F/m) to the particles based on position, velocity, and/or mass. A number of examples will be discussed in class. Some suggestions include:

  • Random accelerations
  • Acceleration toward/away from a point
  • Acceleration toward/away from a line
  • Spirals, Vortices, Tornadoes

    A more ambitious version of this portion of the assignment would include accelerations caused by springs between particles. In either case, the particles should move in a coherent fashion under some force field that is not merely a constant acceleration due to gravity. Your program should have a clearly documented, explicit calculation for the accelerations being applied.

    Bouncing off a plane or other surface

    Your simulation should include at least one instance where the particles bounce off of a plane (or sphere, etc.). This section will include some type of collision detection and collision resolution. Damping during collision is recommended for believable and richer behavior.

    A plane is the easiest surface with which to collide. However, feel free to tackle collisions with multiple planes, spheres, or other surfaces to add to the quality of your animation. A waterfall effect like we saw in Sims' piece could be created from particles bouncing off of a small number of strategically placed planes.

    What to hand in

    You are expected to turn in your program source code (documented for readability), a final report and movie file for this assignment. As in the first assignment, you should turn in a quicktime moviefile. The command below will transform a sequence of images, "imagefile.*.rgb", to a quicktime file "outfile.mov":
    dmconvert -v -f qt -p video,rate=30,comp=qt_anim imagefile.*.rgb outfile.mov

    The images should be rendered 360x243 resolution. They are rendered in a smaller test resolution by default, you will need to explicitly change this in the code in order to render at the requested frame rate. Store your final images and moviefile in your /net/hg121/ directory and include a pointer in your final report. We will let you know when you can delete your frames. (Note: choose your colors carefully, saturated colors, especially reds, can bleed when you play them on an NTSC monitor. Use /usr/sbin/cedit to choose colors, if you like.)

    You should play your moviefile before you turn it in to be sure that the conversion worked. The movieplayer program is run like this: /usr/sbin/movieplayer outfile.mov

    You can look at individual images from the command line using: /usr/sbin/ipaste imagefile.0001.rgb Folks have found that flipping through successive individual images from the command line is useful. You can do this with: /usr/sbin/movie imagefile.*.rgb

    Your final write-up should include a short description of what you did for each part, the problems you ran into and the new concepts you learned about passive particle systems and colliding particles as well as a pointer to your source code and movie files.

    Grading will be broken down as follows:
    Total .........25
    Part 1...........5
    Part 2...........5
    Part 3...........5
    Report.........5
    Creativity...5*

    *Be creative! This assignment is intentionally open-ended. The requirements are meant to exercise your technical and creative skills. The minimum requirements for all of these parts combined will result in an uninteresting animation and will be graded accordingly. Your responsibility as an animator is to work within the constraints of the technology and still keep things exciting. 20% of this assignment is how you use the technology in a creative way. Feel free to contact us to discuss possible modifications to the assignment.