Draw a center ball that applies the sin() function which makes it have a glowing effect. For a natural visual experience of this glowing ball, put frameCount inside the sin() function and makes it smaller so that the ball would not glow(becoming small to big and small again) crazily fast. Then adjust the expression by adding and multiplying certain numbers to make the difference between the biggest and smallest size obvious.
Create a set of balls and use applyAttraction() and applyRepulsion() to make the balls being attracted and repulsed from the center ball.[adding “this.POS = (createVector(width / 2, height / 2);” to apply it in these funtions in order to do vector substitution]
Use checkCollision(other) to add colliding effects among the balls.
Inside function draw(), put applyRepulsion() and checkCollision(other) under the condition that the mouse is pressed. And put applyAttraction() under the opposite condition so that the balls would first be attracted to the center ball and then move quickly away from it when the mouse is clicked. Inside the checkCollision(other) function, the balls would change colors randomly once they collide with another ball.
Make the canvas fullscreen to improve visual effect.