Thanks to SBissay for his Collision detection with a quadtree. Meaning of the various slider variables. - List/Quad: slider variable to select the corresponding algorithm. - dt: delta time (see below). - Radius: the radius of the discs. - Nr of Discs: the number of discs - Show Quadtree: allows you to see the underlined tree structure. Delta time (dt) is perhaps the most intriguing concept to explain. You should think of it as the time that has been elapsed between two subsequent moves: more time should mean more space has been traveled; for this reason the higher the value is, the faster discs will move. Other actions you may take pressing a key or Clicking on stage. - Space: toggle show/hide of dt, Radius, (Show Quadtree). - S: toggle show/hide of the variable StepByStep. Click on stage: pause or do a step ahead in StepByStep mode. To enter StepByStep mode press S key and put slider variable to 1. After that each click on stage makes you advance a single step. When you click on Stop Sign all slider variables return visible, so you can select other options before Green flag. Reference: http://arborjs.org/docs/barnes-hut