Demo based on http://mbostock.github.io/d3/talk/20111018/collision.html