Hints
OptimizationsChaosPro tries to do some optimizations. Despite the optimizations done by ChaosPro you should try to help ChaosPro and write fast formulas. The optimizations in ChaosPro can be applied in only a few cases. Only the formula writer himself knows the exact meaning of the formula, knows when an expression is constant. Optimizations done by ChaosPro include:
Writing to parametersWriting to parameters basically is allowed. But in order to support elimitating if-constructs you should not write to parameters because then they are no constants any more. So please make sure you know what you do. New: Writing to parameters also affects the parameter window! If a formula changes the value of a parameter, then the parameter window will reflect that change and display the new value as soon as the fractal has been calculated. This feature is used by the flame fractal formula: It has two modes: Either you enter dozends of parameters manually or you select the "random" mode, in which all parameters are set to some random values. And if you like the result, you can switch to manual mode and see the random parameters from the previous round and start tweaking these parameters. Parameters get initialized at the very beginning. So changing a parameter assigns a new value for all subsequent pixels! That means, parameters do not get initialized at the beginning of each pixel iteration, only at the very beginning of the fractal calculation! By the way: ChaosPro automatically recognizes that you write to a parameter and internally declares it as non-constant.
Illegal OperationsMany functions only provide results if the input parameter lies in a correct range (the definition range). If the input parameter does not lie in the definition area then the result is unpredictable. Please do not rely on such values as it may change in future. If during the calculation of a fractal image such an exception occurs (division by zero, NaN's, infinity, sqrt(-1), etc.), then ChaosPro will detect this. At the end of the calculation a message will be added to the message window containing the number of pixels which may be wrong because they rely on FPU exceptions.
Infinite LoopsPlase take particular notice to infinite loops: ChaosPro does not recognize them. If you produce an infinite loop then ChaosPro is blocked and you have to kill it. Perhaps future versions will allow you to continue.
Variable conflictsPerhaps you may ask what happens if a transformation, an iteration formula and the coloring formulas all have the same variable declared? Well, each formula has its own workspace for local variables and parameters. That means if each formula has a variable b defined, then all these same-named variables are different and do not interfer in any way. Iteration formulas and coloring formulas share the workspace of the predefined variables. So if you assign a new value to a predefined variable, the new value is valid for the other formulas as well. And due to that you can read/write to z in the loop function of the iteration formula and read/write to z in the loop function of a coloring algorithm and ... they interfer ! You could use any other predefined variable to exchange data between the formula section and the coloring section, but that would be really bad code. And additionally most of the predefined variables get initialized only at the beginning of the fractal calculation, not at the beginning of each pixel... The workspace of transformations and iteration formulas regarding predefined variables is different. |