A ray tracing method for predicting contrast in atom beam imaging is presented. Bespoke computational tools have been developed to simulate the classical trajectories of atoms through the key elements of an atom beam microscope, as described using a triangulated surface mesh, using a combination of MATLAB and C code. These tools enable simulated images to be constructed that are directly analogous to the experimental images formed in a real microscope. It is then possible to understand which mechanisms contribute to contrast in images, with only a small number of base assumptions about the physics of the instrument. In particular, a key benefit of ray tracing is that multiple scattering effects can be included, which cannot be incorporated easily in analytic integral models. The approach has been applied to model the sample environment of the Cambridge scanning helium microscope (SHeM), a recently developed neutral atom pinhole microscope. We describe two applications; (i) understanding contrast and shadowing in images; and (ii) investigation of changes in image formation with pinhole-to-sample working distance. More generally the method has a broad range of potential applications with similar instruments, including understanding imaging from different sample topographies, refinement of a particular microscope geometry to enhance specific forms of contrast, and relating scattered intensity distributions to experimental measurements.