This article is also available in Japanese.
A source object generates rays with some spatial and angular probability. For example, a Source Point generates rays with exactly the same starting coordinates, but with ray direction cosines uniformly chosen over some allowable range. When we trace rays from this source, we must trace "enough" rays to accurately sample the source.
The probability function for a source is usually sampled with a random number generator. The goal of a random number generator is to produce a series of numbers which have no correlation with each other. Then by tracing lots of rays (generating lots of random numbers) we can accurately sample the source probability function.
{All computer-based random-number generation algorithms are "quasi-random" in thay they are limited (ultimately by the number of bits of the operating system, but generally by algorithm assumptions) to have a period over which the random number sequence repeats. Hence no implemented random number generator is "truly" random. In this article, I refer to ZEMAX' long-period random number generator as "truly" random to distinguish it from the Sobol algorithm.}
Sobol sampling takes a different approach. Rather than generating random numbers, it generates a uniform distribution in probability space. This is not just a simple grid, but a distribution which appears qualitatively random, but cleverly "fills in" previously unsampled regions of the probability function.
The zip file attached (which can be downloaded from the last page of this article) shows a simple optical system. Two rectangular sources illuminate a detector. These source objects are designed to produce a uniform, rectangular distribution of rays. The bottom one uses ZEMAX' "true" random number generator, whilst the top one uses a Sobol sampling scheme.





10,000,000 rays:
100,000,000 (one hundred million) rays per source:
and 1,000,000,000 rays (one billion rays!) per source
When there are very few rays (10,000) and many many rays (1 billion) the results of the random ray-trace and Sobol ray-trace are similar. Hence Sobol sampling is most useful in a "sweet-spot" region. The signal to noise ratio (SNR) of the random ray-trace is SQRT(N) where N is the average number of rays hitting a pixel. For the Sobol sampling scheme, the SNR goes linearly as N (see reference 1). This can be seen by taking a cross-section through the distribution with 1 billion rays per source:
Note however that Sobol sampling is not a "magic bullet". In this case, we know that the source irradiance is intended to be uniform. Our prior knowledge of the intended distribution allows us to claim that Sobol sampling is "better" in this case. However, in any Monte-Carlo simulation, there is ultimately no more accurate method that making many samples with a truly random number generator. For this reason, ZEMAX allows you to select either a Sobol sampling scheme, or to use ZEMAX's long-period random number generator, in the source tab of the object properties:
1. Press, Flannery, Teukolsky, and Vetterling, Numerical Recipes, Cambridge Press.