Assignment 2 based on Daniel Shiffman's Attraction / Repulsion example. Attractors get added by pressing left-arrow key, while repulsers get added by pressing right-arrow. When there are same amount of attractors and repulsers, particles will change into purple color and both forces will be effective. Otherwise, one that has more number will override the movement of particles.

Full Screen