- #1
stripes
- 266
- 0
Homework Statement
I am designing a physics simulation that models two balls colliding along a straight line path. I can change the coefficient of restitution, the initial velocities, and their masses. THe assignment asks that we vary at least three parameters, so in my case, the three are the coefficient of rest., the masses, and the velocities.
I have gotten the program working but my instructor keeps telling me that if the user changes the initial velocities of either ball, it only changes the point at which the collision occurs. I've made it so that the collision occurs at time zero, and yes, changing the initial velocity before time zero will change where the collision occurs, but I'm not worried about that. THe point is that I calculate the final position based on the initial velocity, initial mass, and the time. And this final position at any time will depend on whatever the initial velocity was.
I've attached my code. If someone could let me know if there is anything wrong with it, I would appreciate it.
Homework Equations
--
The Attempt at a Solution
See above