VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Elastic Collision

Yehia Muhsen  (5 Submissions)   Miscellaneous   Visual Basic 5.0   Intermediate   Wed 3rd February 2021

Do you like math and physics? If "Yes", then here is the program that you're looking for, but if "No", then you still have a chance to like this program if you like graphics or games programming.
This program is an application for the elastic collision between two objects. In elastic collision, the total momentum is always conserved, and after collision, the final velocities get distributed based on the masses and initial velocities of the two objects.
This program is a good example of how to use math to move objects, detect collisions, draw graphs, and change objects sizes and positions.
In this program, I made sure that all buttons get disabled during the movement except the Stop button, and I used the idea of global variables to exit the loop of action.
One last thing, I think this program is kind of fun, especailly if you try different masses with different initial velocities. The graph also shows some intersting patterns of movements.
I hope you'll learn something out of it... Good luck ...

Rate Elastic Collision (10(10 Vote))

Download Elastic Collision

Elastic Collision Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters