yes i understand. it is a logic animation with simulation of the motion under gravity.

i was trying to find a way to show the energy

kineticenergy[1] = 0.5*mass[1]*L[1]*L[1]*omega[1]*omega[1]
and
potentialenergy[1] = mass[1]*g*L[1]*(1-Math.cos(cta[1])

and use the event handlers in BallsInBox.xml and the evolution for the balls.

it is a very interesting puzzle........ i need some time to think.

my thought strategy is use the BallsInBox.xml to build in the cta and omega because i can't use your due to my lack of code programming power.


anyway your newton cradle is now the most accurate java applet.

I thank you :)