Mass Spectroscopy.

Needs["Graphics`Animation`"];

Off[General::Spell1];

mions:={H->1.,Be->8.,O->16.,Ni->56.,U->235.};

ms[l_]:=Block[{x,y,vx,vy,ax,ay},(
		{x,y,vx,vy}=l;
		{ax,ay}=N[1.2 * 1.6 * 10 ^-19 * charge*{vy,-vx}/m];
		{x,y}=N[{x,y}+{vx,vy}*dt+0.5{ax,ay}*dt^2];
		{vx,vy}=N[{vx,vy}+{ax,ay}*dt];
		{x,y,vx,vy})];

The following cell contains values which may be changed by the user:

         ion is the name of the ion;
         charge is its charge;
         f is the number of animation frames to produce;
         xmax and ymax specify the size of the graph;
         inc is the simulated time between frames, and
         ns is the number of steps between frames.

ion = H;

charge = 1;

f = 10;

xmax = 5. * 10^-10;		ymax = 5. * 10^-10;

inc = 3. * 10^-9;		ns = 20;

After changing the above values as appropriate, evaluate the entire notebook.

DO NOT CHANGE ANYTHING IN THE CELL BELOW !

path={};
m=1.63* 10^-27 * ion /. mions;
{x0,y0,vx0,vy0}={0.,0.,1.*10^-2,0.};
dt=N[inc/ns];
Animate[({xa,ya,vxa,vya}=Nest[ms,N[{x0,y0,vx0,vy0}],ns];
	AppendTo[path,Line[{{x0,y0},{xa,ya}}]];
	{x0,y0,vx0,vy0}={xa,ya,vxa,vya};
	Graphics[{path},
		AspectRatio->Automatic,
		 PlotRange->{{-xmax,xmax},{-ymax,ymax}},
		 Axes->True, Ticks->None,
		 Prolog->{Text[FontForm[StringForm["x= ``, y= ``", xa, ya],
		 		     {"Times",9}],Scaled[{0,.85}],{-1,0}]}]),
	{t,t0,t0+(f-1)*inc,inc}];