Rotate is a Processing applet I made back in October 31, 2009. Since then, it's been refined and optimized several times. Check out the source in the download if you're curious.
Check out www.bluethen.com for more applets.
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).