The collision detection of the dots needs some work.<p>Interestingly, the javascript physics engine moving the dots (box2Djs) is based on a flash library (box2Dflash). You may now offer your own interpretation of that fact depending on your stance in the Flash vs. HTML5 debate.<p>By the way, the code for the bouncing balls is quite readable and commented: <a href="http://www.google.com/events/io/2011/static/js/io.js" rel="nofollow">http://www.google.com/events/io/2011/static/js/io.js</a>