CS206 Assignment 2
Physically-Based Motion Control
J. Scott Hofmann

For Assignment 3 I have implemented a physically-based simulation of two cubes falling to the floor. The equations of motion include a full implementation of angular dynamics as outlined in Witkin and Baraff's SIGGRAPH 97 course notes Physically Based Modeling: Principles and Practice. Unfortunately, the angular dynamics system form a set of differential equations that are (almost) too stiff for my simple Euler integrator to handle, which is evident in the acceleration of the angular velocity of the cubes (the angular velocity is being damped, but the damping factor is swamped by the explosion of the equation solver). Indeed, at one point you can see the bottom cube penetrate the floor as the dynamics equations fail to resolve the collision fully.

My system allows the user to specify the initial location, mass, and coefficient of restitution for each cube, and then runs the simulation applying a gravity force of 10 meters per second squared in the -z (down) direction. The ground is modeled as an (almost) infinitely massive object, so it will remain unaffected by the collision dynamics equations.

Collisions with the floor are modeled by testing each cube vertex for penetration of the ground plane. Collisions with other bodies are modeled using a spherical bounding volume with diameter equal to the cube diagonal, so the cubes can react from a collision without appearing to touch because their bounding spheres have collided.

Click on the image below to get an MPEG movie of the motion.


J. Scott Hofmann
Return to my home page.
Last modified: Wed Oct 28 14:57:12 EST 1998