CMSC 435/634: Introduction to Computer Graphics

Assignment 5
Boids
Due November 25, 2015 @ 1:00 AM

The Assignment

The assignment is to write a program that performs a simple crowd (Boid) simulation. The wikipedia page has a number of useful links about the model and the original paper is linked here and is fairly easy to read. You should render your boids using OpenGL. And the direction and magnitude of the boids velocity should be apparent in the rendering (I used glutSolidSphere and glutSolidCone to accomplish this). Boids should react to other boids that are visible, i.e. that are within some distance. I have provided you with code for a KDTree to help with these neighbor queries. Boids have three goals

  1. Collision Avoidance: avoid collisions with nearby flockmates.
  2. Velocity Matching: attempt to match velocity with nearby flockmates.
  3. Flock Centering: attempt to stay close to nearby flockmates.
An executable of my program is at:
~adamb/public/Fishtank/fishtank

Details about my setup.

634 only

Feed the Boids with a particle system. Pressing the f key will cause food to be placed at the top of the scene. The food falls slowly through the scene with small random perturbations to the x and z components of the velocity. There is an additional force on the Boids that draws them to the food and when they get close the food is eaten and disappears.

Extra Credit

For up to 20 additional points, extend your program with additional phenomena or forces. Be creative. Points will be awarded based on how cool the grader thinks your enhancements are. There are lots of ideas for extensions in the various links on the wikipedia page and here

What to turn in

Turn in this assignment electronically by pushing your source code to your proj5 GIT directory by 1:00 AM on the day of the deadline. We will be looking for multiple checkins documenting your development process.

As always, double check that you have submitted everything we need to build and run your submission, but no generated files (.o's, executables, or images). Be sure to include a Makefile that will build your project when we run 'make', and a readme.txt file telling us about your assignment. Do not forget to tell us what (if any) help did you receive from books, web sites or people other than the instructor and TA.