A charge q with velocity v enter into a region with perpendular to magnetic field B, will move in a circular orbit.
The trajectory of the beam will spread out if the bean is deviated with a small angle \theta (dca in the simulation)  or with small deviation in velocity (dv)

The angle \theta = dca * (random() -0.5); // where random() give random number between 0-1
The velocity v=V+ dv* (random() -0.5);

The trjjectory for all different possible paths are shown in the following simulation.

/htdocs/ntnujava/ejsuser/2/users/ntnu/fkh/chargeinBvdc_pkg/chargeinBvdc.propertiesFull screen applet or Problem viewing java?Add http://www.phy.ntnu.edu.tw/ to exception site list
Press the Alt key and the left mouse button to drag the applet off the browser and onto the desktop. This work is licensed under a Creative Commons Attribution 2.5 Taiwan License
Download EJS jar file(1338.9kB):double click downloaded file to run it. (16 times by 12 users) , Download EJS source (6 times by 4 users) View EJS source