This code simulates an obliquely incident photon source (pencil beam) on a scattering medium. It can simulate one incident point source or many. The program has been tested on and is known to work on Linux and Windows 10.
Configuration is changed by copying config.def.h
to config.h
and editing it. This configuration is then baked into the compiled
binary. This helps the compiler optimize the binary for a faster
runtime and keeps the types of configuration variables clear.
After copying over and editing config.h
the program can be
compiled by running:
./build.sh
On Linux the only dependency is libc, on Windows winpthreads is also required.
The compiled program can be run as:
./mc output_filename_prefix
Currently directories in output_filename_prefix
are not checked
for existence prior to running so the program will fail to save
the output if you don't ensure this yourself.
If you intend on using this as a basis for any published works a citation, while not required, would be appreciated 🙂!
@software{rnpnroblique2024,
title = {Oblique Incidence Monte Carlo},
author = {Palamar, Randy},
year = 2024,
month = 4,
url = {https://github.com/rnpnr/oblique_mc}
}