next up previous contents
Next: 5.4 Implementation Details Up: 5.3 Generation of Random Previous: 5.3.4 Cosine Distribution

5.3.5 Direction Vector Sampling Benchmarks

All the algorithms, presented in the previous sections, were implemented using C++ and tested on an Intel Core 2 Duo E6600 processor clocking at $ \SI {2.4}{\giga \hertz }$ . To compare the algorithms for different parameters, $ {\theta}_{1/2}$ was varied, which is the angle at half maximum $ {g}({\theta}_{1/2})=\frac{1}{2}$ . For the power cosine distribution $ {\theta}_{1/2}=\arccos\left(\frac{1}{\sqrt[{\nu}]{2}}\right)$ and for the coned cosine distribution $ {\theta}_{1/2}=\frac{2}{3}\,{\theta}_{\text{cone}}$ .

The runtimes for sampling 100 million random vectors are compared for different algorithms in Table 5.3. For $ {\theta}_{1/2}$ the random direction vectors follow a simple cosine distribution for all presented algorithms. For this specific case Algorithm 5.6 is able to compete with Algorithm 5.2 for the power cosine distribution with $ {\nu}=1$ and is therefore, due to its simplicity, a serious alternative. For $ {\nu}=1$ the compiler is able to use the square root function instead of the power function, which explains the better runtime. For all other cases, the runtimes for sampling the power cosine distribution are comparable with those for sampling the coned cosine distribution.


Table 5.3: Runtimes for sampling 100 million direction vectors on an Intel Core 2 Duo E6600 processor running at $ \SI {2.4}{\giga \hertz }$ .
$\textstyle \parbox{\textwidth}{
\small
\begin{tabular}{
cS[tabformat=4.0]
S[tab...
...second} & \ang{3.20} & 25.8\,\si{\second} & {--}
\\
\bottomrule
\end{tabular}}$



next up previous contents
Next: 5.4 Implementation Details Up: 5.3 Generation of Random Previous: 5.3.4 Cosine Distribution

Otmar Ertl: Numerical Methods for Topography Simulation