MySimLabs is a web site presenting some Open Source MATLAB tools for simulating how light interacts with opaque surfaces, using Monte Carlo ray-tracing methods. The tools were originally developed in the final two years of my doctorate studies at Luleå University of Technology in Sweden (during the years 2007-2008) where I used them to calculate the absorptance, reflectance and scattering of incident laser light on 2D and 3D rough metal surfaces (and hence the title MySimLabs which is an acronym for My SIMulations of Light (or Laser) ABsorptance and Scattering). They have been made publicly available to promote further research in this area. Feel free to use them as you please. If you make improvements and expansions you are encouraged to communicate this to the author (see e-mail address below or contact details under About), so that it can be published here for the benefit of others.

The MATLAB code is divided into three sections; the main code is presented under Ray-Tracing, where both 2D and 3D Monte Carlo simulation tools are available for calculating BRDFs, reflectances and absorptances for opaque surfaces. The section named Surface Generation & Analysis introduces some tools for generating rough surfaces as well as for analysing these, while the Auxiliary section is a collection of other useful snippets that may come in handy. A complete package of all MATLAB codes presented on this web site is also available as a zip file in the download panel to your right.

In the Links section you can also find references to other useful sites for rough surface scattering modelling as well as databases and libraries of optical materials and their properties.

Latest updates:

2010-12-15: Corrected a bug in the GUI code for GOA that prevented single realisation results to show in the results view.
2010-11-16: Improved the backward compatibility of the RSG code to older MATLAB versions (versions prior to R2009b/v7.9).
2010-10-01: Added new GUI named GOA (v1.01) for ray-tracing simulations of light scattering and absorption of 2D and 3D rough surfaces. Speed improvements to both 2D and 3D ray-tracing codes.
2010-07-29: Added new GUI named RSG (v1.01) for generating and analysing 1D and 2D random rough surfaces.
2010-07-26: Added options for generating non-isotropic 2D random rough surfaces. Speed improvements made for both 1D and 2D surface generating codes.
2009-07-25: Added random rough surface generating codes for surfaces with exponential autocovariance functions.

Quick downloads:
(right click and save as) (130kB)