We present a computational method to directly calculate and visualize the directional components of the Coulomb, radiation, and total electromagnetic fields, as well as the scalar and vector potentials generated by moving point charges in arbitrary motion with varying speeds. Our method explicitly calculates the retarded time of the point charge along a discretized grid, which is then used to determine the fields and potentials. The computational approach, implemented in python, provides an intuitive understanding of the electromagnetic waves generated by moving point charges and can be used as a pedagogical tool for undergraduate and graduate-level electromagnetic theory courses. Our computer code, freely available for download, can also approximate complicated time-varying continuous charge and current densities, and can be used in conjunction with grid-based numerical modeling methods to solve real-world computational electromagnetics problems such as experiments with high-energy electron sources. We simulate and discuss several interesting example applications and lab experiments including electric and magnetic dipoles, oscillating and linear accelerating point charges, synchrotron radiation, and Bremsstrahlung.

AAPT members receive access to the American Journal of Physics and The Physics Teacher as a member benefit. To learn more about this member benefit and becoming an AAPT member, visit the Joining AAPT page.