Is there a simple model for bouncing two balls? One approach is to only look at one ball at a time and consider the other ball as a rigid object. The in angle should be the same as the out angle:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilD03g4Ah4Ak0n_zSML8UnvF9S-aNfbhClRK7DeAROtz6wQNernQBw5auIX5TLGCKHCebKwWRKzrElMfcTxPNBggezh4ETkXQpMPVC1fEerDXJQGnn22wRszfw9HiUGjTeZCHS7z1r8IK-/s400/balls.png)
The result: a very simple ball simulation program:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2lJYJsaeYYbGxwb1hMXkGYvhDVV7t3MHB1_7xJMu2AWdSFWja5DSjH-_pwQz20PLC1NjHh9tPt4PYi0WWxD38lt1xo83_xVEAHssd_5wD8JLif7o-VGn2M_wbODD_alvNRrFCSnbVO6SX/s400/balls_screenshot.png)
There are of course some bugs. Like that the balls can escape... :) Try it out! If the balls get stuck drag them into a new position. Balls version 0.0.1
![](http://lesc.se/balls/jws-launch-button.png)
No comments:
Post a Comment