Member-only story
Modeling a Bullet-Bullet Collision with Python
When I see something awesome, I like to appreciate it by creating a model. It’s just my tradition. So, in this case I’m looking at the very cool slow motion videos showing a mid-air bullet-bullet collision from Smarter Every Day. Check it out.
In particular, I love to see the circular expanding debris after the bullets collide. Now, can I make this same thing happen with basic physics and python? Just to be clear, I’m going to be using Web VPython that has some very nice 3D objects built in.
Simple 2 Ball Collision
It’s best to start with the simplest version of the collision. What about two point particles moving towards each other? How can we make the two objects react to a collision? Of course we are going to use physics.
Suppose when the two objects collide, there is an interaction force between them (I’m going to call the two objects A and B just for reference). Here is a diagram.