My just-about-2/3-done project implements a particle system with dynamic constraints. Constraints allow structures to be built out of the objects in the particle system, and the dynamic part means that they can be created at will by the user.
For my project, I modified the animator (project 3) ModelView and Camera classes to provide the base camera and opengl setup.
I improved my particle system from project 3 by swapping out
Euler-method integration with Runge-Kutta, greatly improving the
realism and "smoothness" of the simulation.
Constraints are implemented in the particle system much as are forces.
Each type of constraint has its own class, and each object which knows
particles it's concerned about (the ones its constrainting).
Each time forces are updated in the particle system (which is several
times per time step, using the Runge-Kutta method), the
constraint-solver forms a sparse matrix relating each constraint to all
other constraints, and a 'target' vector specifying what each
constraint wants its particle's forces to look like. The matrix is
solved by conjugate gradients, and the resulting force vectors are used
to update each constraint's particles respectively.
Unforunately, the liberally-used term "dynamic" is something of a
misnomer, since there's currently no way for a user to add or change
constraints. That is, there are two important unfinished features:
1) The ability to dynamically add constraints.
2) The ability to draw shapes or otherwise add new objects to the system.
Stay tuned, faithful readers. These things and more to come after my functional analysis test. Hurray.
... is available here.