I decided I needed an hour break from Scala hacking, and I am about halfway finished with Sean Carroll's From Eternity to Here, which goes on at great length about entropy as it relates to time's arrow. So for the fun of it I whipped up a simulation of an Ehrenfest Urn using Processing.js.
Check it out here (requires a browser supporting canvas).
Now that I'm done, there are a couple of things I find amazing about this.
- I felt like I needed a break from being paid to write Scala. As opposed to, like, Visual Basic, Java, C++, or something like that.
- Within an hour I was able to download processing, learn the basics, and hack this animated demo together. And put it on a web page, viewable by pretty much anybody that I care to reach. Back in the early aughts I probably spent fifty or sixty hours just trying to figure out how to step debug javascript.
From eternity to here apparently involves a massive improvement in the state of the programming art. Everything is amazing and nobody's happy.
This is genius! The way you connect your efforts to the Louis CK bit takes it over the top.
Got here from Cosmic Variance. Very tidy demonstration. Did you add any noise to the simulation, or is it following a deterministic path? If it is deterministic then by adding a toggle to set the number of balls you would have a nice demonstration of how the time period in PoincarĂ©’s Recurrence Theorem can explode with the dimension of the phase space.
@Aaron the paths are deterministic. Those are good ideas, when I get some time I’ll come back to it. I also wanted to add a measure of the entropy to the animation.