a couple of examples of this for circles and polygons is contained in my new open source Gameprez Developer Kit project at
https://github.com/gameprez/gpdkwhich uses perfectly elastic collisions between non-root objects and a velocity Verlet integration algorithm for simulating the physical motions of the objects. In these examples, each collision with the root element (under user control) adds a velocity vector to the non-root object pointing away from the root element along the direction joining the centers of the two colliding objects.
This is only a simple example for debugging purposes but it would be pretty easy to extend the default forces to include gravity/spring/damping forces etc. in order to constrain the objects to stay on the screen.
Although there's no d3.geom.quadtree support yet I made some progress towards this goal last night (e.g. see issue #8 and branch 8_optimized_collision_detection in the repository --- this code is not working yet but I hope to fix it soon).
The quadtree interface has been hard to figure out from the documentation I've seen so far, but I think I understand how the algorithm works so hopefully it won't take me too much longer to fix this.
It might also be possible to integrate these elements with the force layout directly although I haven't explored this option yet myself, I am interested in this approach also - e.g. see issue #6 in the github repository.
This is my first open source project so any input is appreciated as well :)
Incidentally, there's also a test game called DRONEWAR included in the repository which is also available on
www.gameprez.com with a $50 weekly cash prize for high scores!
Hope this helps,
Danny
GAMEPREZ Founder