Discrete simulation of a hard sphere gas

Elastically colliding hard spheres are a simple but practical model for gas kinetics. Using a simulation of this model one can see how the velocity distribution of such a gas tends towards a Maxwell-Boltzmann equilibrium distribution.

Video of 3D hard sphere gas

Video of 2D hard sphere gas