SignedMCRT is a Monte Carlo Radiation Transfer (MCRT) code that uses signed distance functions (SDF) to represent the geometry as opposed to the usual voxel or mesh represention. The use of SDFs allows modelling of smooth surfaces more accuratly than other methods.
Code prerequisites: Fortran 2018 compliant complier e.g gfortran-9+ or intel oneAPI Fortran. Only tested on Linux and Mac. Unlikely to run on Windows without some changes.
To run the code you can use:
- The Fortran package manager by running; "fpm run" for single core uage or "fpm @runmp" for multicore usage.
See this for more detailed instructions and details on the code and build systems used.
The code in this repo forms the basis for the following publications:
Paper describing operation of signedMCRT: https://doi.org/10.1117/1.JBO.27.8.083003
Paper describing of an application of signedMCRT: https://doi.org/10.1364/OE.451496
Data created with this code can be found at: https://doi.org/10.5281/zenodo.5780513
SDF of University of St Andrews crest. SVG of crest was simplified in Inkscape and then exported using svg.f90 to line segments and assigned optical properties before being illuminated uniformly by light.
Comparison of voxel and SDF models of a glass bottle with scattering contents. The voxel model exhibits un-physical reflections and refractions.
Comparison of voxel interpolated surface normals, mesh based Monte Carlo (MMC), and SDFs model of a sphere being illuminated by a tophat laser beam.
List of SDF functions https://iquilezles.org/www/articles/distfunctions/distfunctions.htm
What can be modelled with SDF's https://iquilezles.org/www/articles/raymarchingdf/raymarchingdf.htm