Simulation of bouncing circles I want to simulate two circles bouncing off one another. For this I am not sure what I need to calculate. I couldn't find any useful information on the internet, so I have thought long and hard about how the velocities would be affected and I think it's a reflection on the tangent of the point at which they meet.
I have the position, velocity and radius of each circle... so can I calculate the tangent?
 A: The link given by @Rahul has formulas, but I'd like to add a geometric interpretation (and have some answer recorded here). Suppose the circles/spheres are identical: same mass, same radius $r>0$.  Let $(x_1,x_2)$ and $(x_3,x_4)$ be the coordinates of their centers. Then the configuration of both circles is encoded by a point in 4-dimensional space, namely $(x_1,x_2,x_3,x_4)$. This point can move freely (with constant velocity) within the domain $U=\{x: (x_1-x_3)^2+(x_2-x_4)^2\ge 4r^2\}$. This is simply the exterior of tubular neighborhood of a line in $\mathbb R^4$. When the configuration point reaches the boundary of $U$, it bounces back just as an elastic point mass would. Indeed, the speed must be preserved by the conservation of energy, and the tangential component of velocity is preserved by the conservation of momentum. Together these two facts imply that the incident angle is equal to the reflected angle. It is not hard to find the equation of the normal vector to $\partial U$ (hint: gradient) and use it to recalculate the velocity of the configuration point after collision. 
With $n\gg 2$ circles/spheres we have a game of billiards in a high-dimensional space with a lot of concave boundaries: a good recipe for mixing things up. Hence, the behavior of gas molecules. 
