Programming language

Most of this work was implemented in the programming language Pascal with the free compiler FPC3.2, embedded in the IDE (integrated development environment) Lazarus 2.2. The IDE allows cross-platform compilation for different operating systems and can be used freely under the GNU GPL license. Although the use of Pascal has been declining in recent years, several reasons led to the decision for this programming language.
The most significant reason is performance. Since Pascal code is compiled into the machine language of the desired target platform, the code is very performant. As the RadiCal method relies on a stochastic Monte-Carlo approach that involves a large number of iterations, it is essential to strive for the lowest possible execution time. Parts of the implemented Monte-Carlo algorithm were implemented in Python and found to be running 50-70 times slower than in Pascal. This performance gap would make any Python implementation virtually impossible, as the currently multi-hour-long raytracing scan would take several days to weeks, making the method impractical.
Another requirement for the choice of the programming language is its support of object-oriented programming (OOP). All relevant features of OOP, such as polymorphism, inheritance, abstraction and encapsulation, are available in Pascal and are crucial elements of the RadiCal implementation. In addition to these two mandatory requirements, further factors supported the choice. Pascal is considered to have good syntax readability in terms of clarity and consistency. Further, the operator overloading functionality allows straightforward implementation of the required algebra for complexvalued numbers as well as for three- and four-dimensional vectors and matrices. Finally, the author has been programming in Pascal-based languages (Turbo Pascal, Delphi, Lazarus) for several decades, significantly increasing the implementation’s efficiency.
Beyond using Pascal for the main modules, C++, PHP, JavaScript, HTML and SQL were used to implement the control, monitoring and evaluation software for the measurement process covered in chapter 8.