A simulation built with matter-js. Green gas initially with a uniform speed distribution will relax to a Maxwell-Boltzmann distribution. Hot gas will be light green/fast and cold gas will be dark green/slow. The demon will strategically open and close his frictionless door to let hot gas into the red chamber and cold gas into the blue chamber. How did the entropy of the system apparently decrease? Did the demon just break the second law of thermodynamics? Maybe we should pick the demon's brain for an answer...
open index.html
in the browser