Introduction

ChaosPro lets you write special classes (i.e. think of them as the main formulas) containing special functions (just as in Java or C++, i.e. member functions) which will be called by the fractal generation routine.
The classes get compiled to native machine code during runtime, no extra compiler is needed. The compiler is quite fast, so the compilation process most of the time won’t be recognized except when you write formulas which are dozends of KB long. But in this case the calculation time of the resulting fractal is even longer, so the compilation time is your smallest problem… ChaosPro icon wink Introduction

You may ask why I implemented an internal compiler, and why I did not use any well known, stable compiler out there, for example the GNU C++ compiler or a DLL which could have been written in any language and contains the fractal formulas. Well, there are a few reasons:

  • No well known compiler has the necessary speed: Compilers do much useful stuff like exception handling, stack checking, error handling, etc.: These things are very useful in programming, but for fractal formulas I don’t need them. If I calculate the natural logarithm of a number then I don’t care about negative numbers where ln(x) is not defined: garbage in – garbage out! Or do you really want a message box pop up in the middle of a fractal generation telling you something about “Overflow” or “Illegal Operation”?
  • No well known compiler has the number type “complex” or “quaternion” built in: This number type can be easily added in C++ compilers using an external class, but each calculation most of the time will call a member function: I need a native number type “complex” for high speed purposes.
  • I can’t distribute those compilers with ChaosPro: They are huge! And if I would support DLL loading, then only some experts would be able to write formulas.
  • I need real time compilation, DLL’s are not good enough: If a formula has many parameters and you specify parameter values, then these parameters are “constant” during the whole fractal calculation: So speed ups can be made by the compiler. DLL’s cannot be recompiled during runtime.

And so ChaosPro has an integrated compiler, so everybody can write formulas without any third party tool. The formulas can be compiled in real time, resulting in fast routines. The compiler has been designed for the purpose of fractal creation, i.e. natively supports number type “complex” and “quaternion”, provides fractal specific predefined symbols and offers fractal specific high speed functions.

Introduction