This code was probably one of my more original works. I'm sure there's other applets similar to this out there, but there really isn't anything this algorithm is directly based or inspired off of.
Each particle is pushed towards the cursor, but with an offset on the angle. This causes the particles to move around the cursors, and eventually swing away. You can find the formula, as well as the rest of the code in the source (pde file).