Animated simulation of an ideal gas