Coulomb scattering demo

speed =

A beam of forty-one test charges is fired at a fixed charge.  These test charges interact via the Coulomb force with the fixed charge but not with each other.  Each test charge draws a one pixel wide trail to indicate its path.


A zero radius fixed charge is created and then covered by a small black circle using two calls to the addObject method.


Setting the radius of the fixed charge to zero disables collision detection thereby allowing the test charges to pass arbitrarily close to the fixed charge without halting the animation.

The particle beam is created using the a JavaScript loop.

for (i=-20; i<=20; i++){

The object identifier, the id, that is returned from from the addObject method is used in the setTrail method to set a trail of 400 data points for each test charge.