A charge-simulation method for two-dimensional and simple three-dimensional electrostatic systems is outlined. The charge-simulation method allows a rapid calculation of the potential by superimposing the potentials of line and sheet charges, slit apertures and arrays of line charges, since the potential of each of these charge elements can be expressed in analytical form. Accordingly, the electric field is also given as a sum of analytical expressions. The trajectories of electrons moving within these fields can be calculated most accurately by using an appropriate Runge-Kutta method. The power of the proposed methode is demonstrated for two special arrangements.