One Atom gas

This Java applet describes a single atom gas moving in one dimension. It accelerates
or decelerates only through classical collisions with the moving piston on its
container. This alone is enough to explain why the gas gets warm when it is compressed
and cool when expanded.