Member-only story

Modeling a Bullet-Bullet Collision with Python

Rhett Allain
11 min readJun 27, 2023

--

Bullet-Bullet collision modeled with 40 balls for each bullet using Web VPython

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.

--

--

Rhett Allain
Rhett Allain

Written by Rhett Allain

Physics faculty, science blogger of all things geek. Technical Consultant for CBS MacGyver and MythBusters. WIRED blogger.

No responses yet