Simulation of gas in 2D

Atoms are represented by solid, smooth spheres. Molecules are represented by rigid, smooth sets of spheres.
No vibrations are considered in this model. All collisions are elastic, with the walls and between particles.
Notice than in average the kinetic energy only depends on the number of degrees of freedom:
For oxygen and nitrogen molecules the angular motion is only one degree of freedom (in 2D).
For argon atoms, oxygen and nitrogen molecules there are two degrees of freedom in linear motion (X and Y).
This can be confirmed by looking at the ratios of energies (shown on the right).