I'd like to simulate a rolling ball system on a website. By rolling ball systems I mean things like:
I assume that flash or a java applet would be the way to do this. The main issue with this is that balls need to run along tracks, fly through the air, then land, go through spirals, etc. This would look best if it was 3D, but I don't want to spend a huge amount of time on this, so 2D would be fine.
Is there a physics engine I could use which would allow me to do this fairly easily in either java or flash?