+ 3
Yes
But it would be better if you use some available physics engine
For the understanding you will need to calculate the distance between each object on your canvas/scene and then modify their speed/direction, all this per frame basis, so it is going to be processor intense operation, which will need highly optimized code.
http://www.cannonjs.org
http://brm.io/matter-js/
Just to name a few, Google "js physics engine" and you will find many many more.
+ 2
Not sure what you mean by "see example"