This is a representation of Paul Ehrenfest's model, namely the Wind Tree Model, a simplification of his teacher Boltzmann's ideas about thermodynamics. In the model, Ehrenfest replaces Boltzmann's chaotic colliding gas molecules with two types of molecules: so called trees and wind particles. The trees are stationary squares, while the wind particles are moving points that do not collide with each other, only with trees; when these tree-wind particle collisions occur, perfect bounces are applied thereby limiting the available directions of velocity to four (represented as red, orange, blue, and green in the key). The Wind Tree Model vastly simplifies the math of Boltzmann's H-theorem, and allows for a quick observance that stosszahlansatz (literally, the "collision-count-assumption") is an arbitrary selection. Basically, as James Maxwell put it "The second law of thermodynamics has the same degree of truth as the statement that if you throw a tumblerful of water into the sea, you cannot get the same tumblerful of water out again.” In this program you can change the length and width of the boxes (though they would be equal in Ehrenfest's model, it's fun to play around with different numbers to see what happens). To do that use the a and b sliders. The # slider just below them represents the number of particles to be released. Once you have these settings set, click the Draw Trees button to initiate the draw phase, after which you can release your particles into the 'forest' by clicking the Release Particles button. Toggle color mode with its appropriate button which rainbowfies the usual color of the particles (see Direction Key to the left). I made it so it does so in a base manner (i.e. after each bounce, the rainbow resets perfectly for its new trajectory). Below that button is a toggle for the help screen, the Help button. Diagonally up from there is the trail toggle which stamps the particles' trajectories; this is meant to make it easier to follow the particles if you're having a tough time keeping track, but they also make interesting patterns. The reverse button demonstrates the trouble with stosszahlansatz as pointed out by Austrian scientist Johann Loschmidt: when the particles path are reversed (i.e. time is reversed) the collision-count-assumption cannot hold. And so that very assumption was accidently hand-picked result, not a derivation for an arrow of time. On the bottom are counters for the four directions, notice how that as time evolves, the numbers tend to be about equal, which demonstrates precisely what Ehrenfest said when he explained Boltzmann's H-theorem hypothesis through this simplified Wind Tree Model. To the right of those is a pretty picture of a tree in the wind and to the left of those is Paul's head looking on at the model. Okay.
I've had trouble on slower computers running this project, specifically when it comes to the Reverse button. It seems as though if the reverse button is hit during a bounce of one of the particles, sometimes the particles get stuck in the trees. I think this comes down to script efficiency and I'll have to work on it in the future. I think I'll use arrays and clones, concepts that are novel to me as I have just reentered programming in Scratch. I'll see what I can do!