Monte Carlo reflection at a surface -- Algorithm 4.13

These algorithms are used to give the direction of a particle after interaction with a surface. The 'weight' of the particle (representing the intensity of a corresponding ray) would also be modified by multiplying the weight before transmission or reflection by the corresponding transmittance or reflectance of the surface material.

a. Alternative modes of reflection and transmission ('Top-hat' method).

Consider a ray which may be split with m different modes of reflection or transmission at a surface. Let p1, p2 ..., pm be the fraction of the ray in each of the modes (p1+p2+...+pm =1). The following procedure makes a weighted random selection of a mode.

Input

Random number R
Array cumulative(), where cumulative(1)=p1, cumulative(2)=p1+p2,
cumulative(k)=p1+p2+...+pk, cumulative(m)=1

Procedure
rand=R
k=1
while rand´┐Żcumulative(k)
k=k+1
end while the final value of k is the mode selected
Note

This may be used in a simple model in which the 3 modes are transmission, diffuse reflection and specular reflection. Alternatively, the values in array cumulative() may represent an arbitrary distribution function divided into m finite zones.

Source

Tocher(1) , Tregenza(2)

b. Lambertian reflection

The rule for diffuse reflection from a plane surface is the same as for random emission from a diffusing surface. The procedure gives the direction cosines of the reflected particle's direction from its point of interception with the surface.

Input

Direction cosines of surface normal, n1 n2 n3
Perpendicular distance of surface from general origin, P
Random numbers, R1, R2

Procedure

(select direction of emission) algorithm 4.12b
(calculate direction cosines) algorithm 5.11
(convert cosines to general coordinates) algorithm 5.11b

Source

Tregenza(2)

c. Specular reflection

The direction cosines of a particle after specular reflection are given by algorithm 1.43a.

References

1. Tocher K D The Art of Simulation (London: English Universities Press) (1963)

2. Tregenza P R The Monte Carlo method in lighting calculations Lighting Research and Technology 15 (4) 163-170 (1983)

Go Back to Subtask C Contents