CS384G Final Project

Dynamic Constraints

Evan Archer

Introduction

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.

Technical Stuff

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.

User-interaction is implemented using the OpenGl selection buffer. I chose to make sense of three-dimensional selection by allowing the user to drag a particle around the plane defined by 1) the direction the camera's currently looking and 2) the current position of the particle. Some fun geometry is used to move the particle to the 3d position that is directly 'behind' the mouse.

Along with dragging stuff around, the user can use a gui to interact with the simulation. Currenly, it's possible to pause and (thankfully) to restart.

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.

Caveats

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.

Code

... is available here.

References

[1] Barzel, R. and Barr, A. H. 1988. A modeling system based on dynamic constraints. In Proceedings of the 15th Annual Conference on Computer Graphics and interactive Techniques R. J. Beach, Ed. SIGGRAPH '88. ACM, New York, NY, 179-188.

[2] Pixar Physically-Based Modelling Course. http://www.pixar.com/companyinfo/research/pbm2001/

[3] Course notes for Animation Physics at the University of British Columbia; http://www.cs.ubc.ca/~rbridson/courses/533b-winter-2004/
(thank you Google)

References for things that aren't finished or... just... whatever:

[4] Moore, M. and Wilhelms, J. 1988. Collision detection and response for computer animationr3. In Proceedings of the 15th Annual Conference on Computer Graphics and interactive Techniques R. J. Beach, Ed. SIGGRAPH '88. ACM, New York, NY, 289-298.

[5] Baraff, D. 1989. Analytical methods for dynamic simulation of non-penetrating rigid bodies. SIGGRAPH Comput. Graph. 23, 3 (Jul. 1989), 223-232.