Surface Scattering Theory
Several boundary features can be used to scatter rays. These include diffuse and isotropic reflection from a Wall, and perturbations due to surface slope error with an Illuminated Surface. These scattering models can be used in both transmission and/or reflection with the Scattering Boundary feature.
Diffuse and Isotropic Scattering
Diffuse (or Lambertian) scattering follows the cosine law. That is, the flux dn of rays across a surface element A whose directions lie within a small solid angle dω is proportional to the cosine of the polar angle θ:
or, substituting the expression for the differential solid angle,
gives
where φ is the azimuthal angle.
For isotropic scattering the flux of scattered rays is the same for any differential solid angle; that is
or
Diffuse and Isotropic Probability Distributions
In 3D, the normalized probability distribution functions f(θφ) for diffuse and isotropic scattering are given by
where
In 2D these distributions become
where
The direction components of a ray after it scatters diffusely or isotropically are given by
where δn is the component in the direction of the surface normal (ns) and where δt1 and δt2 are the components in the two directions t1 and t2 orthogonal to the surface normal. That is, after scattering the reflected and transmitted ray directions are
where
Surface Slope Error
Following Ref. 20, rays will deviate upon reflection or refraction from a surface with a nonzero slope error. It is assumed that the tangential deviation is negligible and that the radial distribution is Gaussian. Therefore, given an angular slope error σ, the probability distribution function for the polar angle is a Rayleigh distribution of the form
 ,
which can be used to get the direction components δn, δt1, and δt2, as shown in the previous section. The effect of applying a surface slope error is to perturb the surface normal ns to a value given by
form which the equations of reflection and refraction proceed as normal.