Name: Derrick Huey
User: dejhuey
Class: CMPS161
Final Project: Explosion Physics Simulation
Files
README: README
Project Report: Project Report
Source Code: sourcecode.zip
Executable: final.exe
Video: proj.avi
Description
This program simulates the linear motion aspect of rigid body dynamics of objects that might result from an explosion occuring in the middle.
Details
This program explores the linear motion aspect of rigid body dynamics, projectile motion, and friction. The principle of linear motion in rigid body dynamics makes use of a "center of mass". To determine the general motion of the object influenced by forces, you simply add up the forces acting on each point of the object and divide this sum by the object's total mass, resulting in the object's acceleration. From there you integrate over time to get the body's new velocity and position:
For the explosive force acting upon an object point, i was unable to find a suitable force-across-distance equation, and thus I settled on an inverse distance-squared relationship. To figure out the force vector, I used the 3D vector component calculations described below:
I had these forces act upon the objects for the length of one second, taking the calculations at intervals of 10 milliseconds. After that, I made the objects into projectiles by leaving the only force to act upon them as gravity. Once the objects hit the ground, friction kicks in. I calculated this by multiplying the opposite of the velocity vector by some user-defined coefficient (between 0 and 1).
Instructions
Adjust rotation sliders to rotate the scene and get another viewpoint
Adjust the text fields to change object properties, explosion force magnitude, and friction coefficient. Hit the Enter key after changing to initiate changes
Hit the Boom button to play the animation
Hit the Reset button to reset the animation
Images
Slant view, original positions:
Slant view, objects in motion:
Side view, original positions:
Side view, objects in motion:
References
[1] Chris Hecker. Physics, The Next Frontier. Game Developer Magazine (Oct/Nov 96). Pages
12-20, available from http://chrishecker.com/images/d/df/Gdmphys1.pdf
[2] Chris Hecker. OpenGL 3D Physics Sample, available from
http://chrishecker.com/images/3/33/Gdphys3d.zip
[3] The Physics Classroom. Projectile Motion, available from
http://www.physicsclassroom.com/class/vectors/U3L2a.cfm
[4] Tom Nally. Projectile Motion in 3D Space, available from
http://babek.info/libertybasicfiles/lbnews/nl130/proj3d.htm