Particle Simulation

Eric Osugi

CMPS 161

Winter 09

 

 

Description:  This is a particle simulation based based off a puzzle game called auditorium.  It is an attempt to simulate the physics that goes on and give the user the ability to switch between parameters.  There are a total of six forces implemented.  These would be up, down, left, right, gravitational, and anti-gravitational.  These forces are represented with a circular object with another circle around them indicating the area of effect.  The user can then toggle this area of effect to have the force uniformly distributed or to have it weighted.  The user can also toggle whether or not the particles experience a drag force.  The particle objects are stored in a deque that is iterated over on each refresh to calculate a particles new velocity.  Every object updates the particle system with each iteration to refresh the screen.  The cannon shoots particles with a spray width that gives them a more stream effect.

 

 

 

 

User Guide:  To start with, each type of force object is represented by a different color.  Up is green, down is blue, left is light blue, right is red, purple is gravitational, and yellow is anti gravity.  They can be selected in this order with the numbers 1-6 and the canon can be selected with 0.  The user can move the selected object around with the arrow keys and increase the radius of effect with gzh and gxh, this is also used to rotate the canon.  Drag can be toggled on and off with gwh and force weighting can be toggled with geh.

 

 

.exe  source