CS520 Assignment 3: Constrained Particle System
This is an old assignment. Do not use.
Due Wednesday Apr 16, 2014, by 11:59pm
Instructions
Please download the assignment writeup here.
You can use your OpenGL setup from Assignment 1 as a starting point.
Useful (free) software for solving linear systems (you are not bound to using any particular solver software, listed or not):
You can find a writeup corresponding to the Constraints
lecture here.
Some hints for solving linear systems in the assignment:

The system of equations in this assignment is symmetric, but not necessarily positivedefinite. In some isolated configuration, the system matrix can be singular.
You can handle these singularities using singular value decomposition. See Chapter 14.4. Singular Value Decomposition in the GSL library, in particular,
the routines gsl_linalg_SV_decomp and gsl_linalg_SV_solve. After calling SV_decomp and before calling SV_solve, you should filter the singular values:
You should truncate to 0 any singular value that is less than eps * largest singular value. You can use, for example, eps=1E6.

Note that the assignment requires the particles to stay in the xy plane, i.e., z=0 for all particles for all times.
Therefore, you may simplify your simulation by omitting all the z degrees of freedom.

Baraff and Witkin's course notes give an alternative system version, formed by conjugation of the mass matrix. You may use this version
in your assignment if you wish.
How to submit the assignment
Upload your entire solution as one zip file to the Blackboard.
Don't forget to include your README file,
the compiled executable (Windows or Mac, include all the required DLLs),
the animation frames, and
any other material required by the assignment writeup.
For the animation, use the same format as
with Assignment 1.
Please submit JPEG frames (assumed frame rate is 15 fps),
at the 640x480 resolution. Do not exceed 600 frames.
Example screenshots
Extra credit ideas
 Implement a timevarying random force field.
For example, you can use Perlin noise.
 Make a screensaver (driven by the timevarying random force field).
 Implement a higherorder integrator, e.g., RungeKutta 4th order.
 Any creative extra credit contributions are encouraged.
Jernej Barbic, USC