Version 6.01 (May 2008)
An #include <vector> was added to matrixmath.h to allow some routines to compile properly.
Version 6.00 (February 2008)
An abstract class Reflectance was created to handle the wavelength dependence of a diffuse scatterer. Reflectance is used by Lambertian_BRDF_Model and Diffuse_Subsurface_BRDF_Model, where beforehand the reflectance was described by a Table. Three different instantiable classes inherit the properties of Reflectance:
Support for rigorous coupled-wave (RCW) calculations for diffraction from gratings was added to the library. The following classes were added:
File access was improved by introduction of classes streambuf_with_comments, ifstream_with_comments, and istream_with_comments so that input files can have comments and redirection. These classes are documented in the header file scatmech.h. These classes are used by the standard input functions, dielectric_stack, Generic_Grating, dielectric_function, and Table.
Version 5.03 (August 2006)
Version 5.02 (July 2006)
New functions (e.g., rxnni(...) and rnni(...)) were added to dielectric_stack which return reflection and transmission coefficients as functions of internal incident angle, as opposed to vacuum angles.
Fixed an error in Model::set_parameter(const std::string& parameter, const COMPLEX& value).
Modified Bobbert_Vlieger_BRDF_Model so that it can accept any stack of films on the substrate. This required changing the names of some of the parameters, since n1 was the original film dielectric function. Also removed code and options for saving the A-matrix, since it was incompatible with the new film stack code.
An error was found and fixed in the reading of dielectric stacks by Model::AskUser().
Version 5.01 (October 2005)
An error was found and fixed in the evaluation of Elliptical_Mesa_PSD_Function.
Version 5.00 (July 2005)
The class BRDF_Model requires virtual member functions jones() or mueller(). In past versions, these were functions of the direction, defined by thetai, thetas, and phis. In Version 5.00, these function have no arguments, but the variables thetai, thetas, phis, and rotation are defined before these functions are called.
Enhanced the following models:
Added Free Space Scatterers:
Added new BRDF models:
Free_Space_Scatterer now has lambda as a true parameter.
BRDF_Model now has a parameter rotation, which serves to rotate the sample about the surface normal.
Upgraded the run-time mechanism for the library. The changes simplify the administration of most classes inheriting Model. All models now define parameters using the DECLARE_PARAMETER(type,name) macro in the class declaration, and use the DEFINE_PARAMETER(class,type,name,descritpion,default) to define the variable instance. A number of functions are provided (see inherit.h) that enable a program to obtain a list of model inheriting another model, a list of parameters for any model, and information about those parameters. Model initialization is now automated, circumventing the need for each model to define a constructor or destructor. Lastly, the set_parameter(name,value) function is automated, so that this function need not be defined for every model.
Fixed a problem with the polar function for Vector3D, found for the .net version of Visual C++.
Fixed an error in MuellerPartialLinearPolarizer, which caused it to yield incorrect results.
Version 4.01 (June 2004)
Fixed an error in Finite_Aperture_BRDF_Model, which caused it to yield incorrect results in out of plane geometries.
Fixed an error in Uncorrelated_Roughness_BRDF_Model, which caused it to yield incorrect results.
Fixed some errors in the set_parameter function for Subsurface_Facet_BRDF_Model, Lambertian_BRDF_Model, and Rayleigh_Defect_BRDF_Model
Fixed a problem that caused comments to not be accepted in all conditions for console input.
Fixed a problem with some constructors and destructors by creating a virtual destructor for the class Model and by initializing some values in the copy constructor for Bobbert_Vlieger_BRDF_Model.
Version 4.00 (July 2003)
Several new BRDF models were added:
Several models now implement scattering in transmission mode:
A new class, CoatedMieScatterer, was added. It implements the Mie scattering theory for a coated sphere.
A fourth example, Example4, has been added to the set of example programs. This program is a Mie scattering program.
Renamed the class Torrance_Sparrow_BRDF_Model to Shadowed_Facet_BRDF_Model since the new name describes the model much better than the old one. Torrance and Sparrow derived a specific shadow function, and yet the model actually implemented the theory for any shadow function.
Renamed the class Spherical_Particle_BRDF_Model to Double_Interaction_BRDF_Model, and removed the subclasses (previously Rayleigh_Particle_BRDF_Model, Rayleigh_Gans_Particle_BRDF_Model, and Mie_Particle_BRDF_Model). The new class, Double_Interaction_BRDF_Model, which requires a SphericalScatterer, has the same functionality as the previous suite of classes.
Renamed the classes Null_PSD_Function, Null_Slope_Distribution_Function, and Null_Shadow_Function to Unit_PSD_Function, Unit_Slope_Distribution_Function, and Unit_Shadow_Function, respectively. The new names are more appropriate for their function.
Improved the methods by which inheritance structures are maintained:
Errors in Rayleigh_Defect_BRDF_Model and One_Layer_BRDF_Model were found and corrected. The resulting differential cross sections and BRDFs were off by a factor of the index of the medium surrounding the defect.
The code for Diffuse_Subsurface_BRDF_Model was modified to properly account for light which is reflected back into the material by the surface.
A number of classes did not have their function get_parameter declared virtual. This has been corrected.
Modified the function dielectric_stack::AskUser() so that films can be specified without a film specification file. See class dielectric_stack.
Removed the function JonesVector::operator*(const JonesMatrix& m). The interpretation of left multiplication of a Jones matrix by a Jones vector is poorly defined.
Changed the improper conversion constructors, JonesMatrix(const MuellerMatrix& m) and StokesVector(const StokesVector& s), so that they are explicit constructors. This change avoids the accidental use of the improper conversions. See class JonesMatrix and class JonesVector.
Removed the MuellerMatrix(double x) constructor, and replaced its function with a new function MuellerDepolarizer(double x). Added the functions MuellerZero(), MuellerUnit(double x), and MuellerPartialPolarizer(double tmax, double tmin, double angle). Also added functions which return a variety of common polarization states. See Common Optical Elements.
Created a function SCATMECH_message to handle all terminal output, and functions SCATMECH_set_istream, SCATMECH_set_ostream, and SCATMECH_delim to set the input stream, the output stream, and the delimator used for the input stream. These changes allow more flexibility to change the input and output streams. See User Interface Functions.
Removed the function read_stack_file() from the class dielectric_stack and replaced it with an equivalent static member function dielectric_stack::AskUser(const string& prompt,const string& deflt). This change was made because the old function did not give a descriptive prompt, which made some uses of the function confusing. It also makes the library conform to the AskUser function convention of SCATMECH. See class dielectric_stack.
Changed the class dielectric_stack so that complex angles of incidence can be handled. This change was made for a future use, where evanescent fields are incident upon the surface. See class dielectric_stack.
Version 3.01 (May 2002)
Added a feature in all AskUser routines: redirection of the input stream to a file can be achieved by starting a response with "<" followed by a filename. Redirection continues until a line beginning with ">".
Corrected code in bobbert1.cpp , which affected the solution only for particles separated from the surface.
Corrected code in askuser.cpp in routine SCATMECH_set_streams.
Version 3.00 (December 2001)
Support for non-ANSI/ISO-compatable C++ compilers was removed. The class for complex numbers is now complex<double> , and the library uses the std namespace. The entire SCATMECH library is contained in the namespace SCATMECH. The SCATMECH namespace can be removed by setting the preprocessor variable NO_SCATMECH_NAMESPACE.
Three new light scattering models were added:
A new virtual class, Local_BRDF_Model, was created for all models which are best defined in terms of differential scattering cross-sections (DSCs) rather than bidirectional reflectance distribution functions (BRDFs). This class enables access to the Jones and Mueller matrix DSCs and provides the conversion from DSC to BRDF.
Three new virtual classes, with a number of inherited classes, were created to enable plug-in of new functional forms for the slope distribution function, the power spectral denstiy (PSD) function, and the shadow and obscuration function:
The virtual class BRDF_Model has been modified by adding functions, BRDF_Model:: Jones and BRDF_Model::Mueller, that enable scattering models to be evaluated in different polarization coordinates. The commonly used s-p basis for describing polarization can be replaced with an x-y basis or one defined with respect to the plane including the incident and scattering directions. See Coordinate_System for more details. The default coordinate system is the s-p basis for both the incident and scattered directions.
Vector-based versions of BRDF_Model::Jones and BRDF_Model::Mueller were added to enable these functions to be evaluated when the directions of the source, viewer, and surface normal are known. These functions should improve the functionality of the library in rendering applications.
The following classes are new and allow the library to more easily calculate the wavelength dependence of optical properties:
The following classes associated with the optical properties of materials were substantially changed:
All classes that used either the classes dielectric_constant, optical_constant, or dielectric_stack were modified to enable use of the class dielectric_function and the new version of dielectric_stack.
The class Facet_BRDF_Model was changed to inherit the properties of dielectric_stack. This change allows the theory to model a very rough surface with a conformal stack of dielectric layers. Also, an intermediate singularity existed for scattering in the retroreflection direction; this singularity was removed by forcing a small change in the scattering angle for such conditions.
The data type for character strings was changed from char* to the class std::string.
The classes Vector, CVector, Matrix, and CMatrix have been replaced by the templated classes Vector3D<TYPE> and Matrix3D<TYPE>. The documentation for these classes have been moved to the respective include files vector3d.h and matrix3d.h. The old classes continue to exist as typedefs.
Additional code was added to all of the BRDF_Model classes in order to enable the dynamic creation of a database of classes. With the new code, new classes can be created by a user and registered with the database, thus allowing the new classes to be incorporated more seamlessly into the library. Two source files, User/user.h and User/user.cpp, and a manual page "Writing your own BRDF_Model class" have been created to facilitate the creation of user-defined scattering models. The header file inherit.h defines and documents the Inheritance<Model,Parent> class which is used to tabulate the class inheritance structure.
Many classes have a new function, set_parameter, added to them that allows setting parameters by name. These functions pass requests to members and children, when appropriate.
Version 2.00 (March 2001)
Four new models were added:
The classes Spherical_Particle_BRDF_Model and Rayleigh_Defect_BRDF_Model each had a dielectric_stack as a member function. The classes now inherit the properties of dielectric_stack, allowing them to access all of the member functions of dielectric_stack.
Version 1.01 (July 2000)
SPHDFCT.CPP: An error was discovered in Rayleigh_Defect_BRDF_Model that affected the absolute BRDF, but not the polarization. The error was fixed. (11 April 2000).
RAYGDFCT.CPP, POLS.CPP: These files should not have been included in the distribution. The files have been removed. (22 June 2000).
CROUGH.CPP: An error was found in Correlated_Roughness_BRDF_Model. If the substrate index was real, the results were erroneous. The problem was traced to the wrong sign of a square root being used. The error was fixed. (30 June 2000).
Numerous files: The C++ scoping rules for "for" loops changed so that the "i" in "for (int i=0;i<n;++i)" now belongs to the loop, rather than the code that contains the loop. To maintain compatability with older versions of C++, most of the declarations were moved outside of the loop.
Numerous files: Some compilers have displayed errors with "COMPLEX(x)", when "x" is a double. This problem was fixed by changing all "COMPLEX(x)" to "(COMPLEX)(x)".
For More Information
Current SCATMECH version: 6.00 (February 2008)