Assignment:
This week, you
are to redo your springy object simulation, or do an entirely new
configuration, but this time using rigid body simulation. You
should build one or more simple rigid polyhedral structures, and
have them behave dynamically in a simulated environment. Continue
using the Runga-Kutta fourth-order integration scheme, and your
collision detection code for particles and planes. Particle
collision detection will not always work correctly between
polyhedra because collisions might be edge-edge rather than
corner-face collisions. However, if you put one polyhedron within
a box, vertex-face collisions are the only ones that will occur.
You will, however, have to modify your collision response code to
impart the right impulse to the rigid body to get the appropriate
reflection of the colliding vertex's velocity.
If you are
having fits getting your collision response code to work
correctly, you can do a simpler simulation. Connect a springy
strut to the ceiling and hang a rigid body from it. Start it
bouncing around, and the strut forces on the rigid body should
cause it to bounce around and induce rotations.
Please feel free to use the Baraff and Witkin Siggraph course notes freely, including code, in your implementation.