next up previous contents
Next: 5.4.1 Simulation Flow Up: 5. Surface Rate Calculation Previous: 5.3.5 Direction Vector Sampling

5.4 Implementation Details

The complete topography simulation algorithm was coded in C++. Most parts were implemented in a multi-dimensional way. Only a few functions were treated separately for the two- and three-dimensional cases, such as testing for ray-surface intersections, which requires bi- or trilinear interpolation in two and three dimensions, respectively. However, using the template mechanism of C++ [124], both cases are processed separately during compile time. In this way, heavy optimizations by the compiler, such as loop unrolling for iterations over the dimensions, are possible.



Subsections
next up previous contents
Next: 5.4.1 Simulation Flow Up: 5. Surface Rate Calculation Previous: 5.3.5 Direction Vector Sampling

Otmar Ertl: Numerical Methods for Topography Simulation