I eventually want to simulate cosmic ray propagation in a random magnetic field, but will start with a particle of some charge in a uniform field. In order to simulate it, what I think needs to be done is to create a 3d array of points, with a value for the magnetic field magnitude and direction (all the same in a uniform field) at each point, and then define one of the points as being the starting point for a charge with a specific velocity and direction. Does this sound like the right way to go so far? So as the charge moves through the uniform magnetic field, it should trace out a circular path, correct? I'm having trouble understanding a few things: How is the particle's position and velocity defined in a discrete array of points such as this? Because the magnetic force is only evaluated (and thus only applied) if a particle hits one of the points, it seems like i could assign a path for the particle that would avoid most of the points in the array, thus giving an inaccurate result. Is this making any sense? I'm really confused about this. How does the magnetic field vector at a given point in the array actually change the particle's direction? According to F=qVxB, the force will be perpendicular to the direction of the velocity, but it seems like the force is instantaneous, so the acceleration is instantaneous. How is the new direction of the velocity determined at this point? Thanks.