This simulates collisions between balls in 2-dimensional space. To drop a ball, left click somewhere on the canvas. You can click and drag before releasing to give the ball an initial velocity. To make it more interesting, you can right click somewhere on the canvas and then right click somewhere else to draw a line for the balls to bounce off of. The rebound ratio below indicates how much of the ball's velocity it keeps after it bounces off the lines drawn, though it isn't perfectly accurate.