Dynamics of small particles in electromagnetic radiation fields: A numerical solution