Recently I’ve been thinking about how an asymmetric periodic potential can result in net motion in one direction. In particular, I’ve been thinking about how muons hop around in crystalline materials such as Cr2O3. Possibly something like this:

Part of the unit cell of Cr<sub>2</sub>O<sub>3</sub> with a 'muon' (small grey sphere) hopping in a circular path<sup>†</sup>. Cr's are the large blueish-grey sphere and O's are the red spheres. Part of the unit cell of Cr2O3 with a 'muon' (small grey sphere) hopping in a circular path. Cr's are the large blueish-grey sphere and O's are the red spheres.

At the same time I’ve been wanting to play around with javascript and the excellent p5.js framework, partly inspired by the excellent Coding Train coding challenges.

As a simple demonstration of this, I thought to have a bunch of classical particles hopping randomly in a saw-tooth potential. The p5.js webeditor is a great place to get started with p5.js and it’s what I used to make the following:

Click around in the window to generate randomly-sized balls at your mouse location. You can adjust the strength of ‘gravity’ and the height of the potential. The balls are given a random kick if they drop below 60 pixels from the bottom. I guess the key point here is that the ‘x’ component of the random kick is equally likely to be aimed to the left or the right. That is, based on the random kicks, there is no preference for the balls to move left or right – the asymmetric motion arises from the asymmetry in the ‘potential’.

You can see and edit the code I used to make this little demo here. I’d be happy to hear of any bugs or suggested improvements - I’m sure there are many since I wrote this as just a rough-and-dirty demo rather than an accurate physics simulation.

I obtained this path using density functional theory and the nudged elastic band (NEB) method.