[quote author=Fu-Kwun Hwang link=topic=4.msg1557#msg1557 date=1185718306]
It is always difficult and take time to find out the bug, especially you are working with another language.

Did you change the setting in the loop for your code?
Did you make sure all the particles are not overlap with each other in the initial state?
If you can run  your code step by step, you might be able to find out bugs in your code.
I was assuming the distance moved between each time step is smaller than the size of the particle.
It might be your time step is too large or the velocity is too big. In that case, try to use a smaller time step.

The original source code for this java applet is attached.

ohh i thinks is the velocity its 1.5 in one ball and 1.3 on another  ???

i will try ;)