This project shows how you can use the cos function to control particle animation. Change the minimum and maximum values to control how the particles move.