@NathanMerrill: So, in other words, without resorting to bignum libraries, it's impossible to have a chance at randomly getting any possible shuffle of a deck of cards.
Doesn't that also depend on the period of the RNG used? I mean in theory the seed could be in a range that is a lot smaller than the period of an RNG (however I don't actually know much about RNGs)
The particle is the single point that represents the current configuration. Each point on that 2D square (which wraps around the edges) has an associated potential energy value.
@El'endiaStarman It's 3D physics but 2 degrees of freedom and therefore a 2D problem (looking at configuration space).
@PhiNotPi: Embarrassingly, my real problem was that I updated the angular position of the left spinner before calculating the torque for the right spinner. Fixed version: jsfiddle.net/adq75r56/3