Memebers of this group:
Dan Bloznalis
Sonia Kumar
Allison Wisniewski
Steven Ilami
You can download the code here
Physics Involved
V _{i} =Inital Velocity
a= accleration (which is a constant,and always 9.81 m/s^{2})
t=time
V _{f} =Final Velocity
We start with the simple 2d motion eqations
V _{f} =V _{i}+a*t
The way we execute our program is chunk by chunk. frame by frame
for every frame gravity is accounted for by using the equation above and keeping the time
from the previous frame to calculate velocity.
The position is determined by constantly updating both x and y coordinates
After all of this is updated, there is a check to determine whether or not it has
hit the ground or a wall.
If it has, then the velocity in the y direction is inverted, and reduced by its
elastic constant
If it has hit a wall, then the same is done, just to the x velocity.
You can email me at:
ilami [at] usc.edu
