Particles in a Box

Simulation of particles in a box.

This python script uses a class called particle which contains member variables for position, velocity, and size. Collision detection is handled using the numpy linear algebra library, which computes the tangent line upon a collision. The angle of collision is determined using the two-dimensional elastic collision equation.

GitHub

Written on May 20, 2020