Predefined VariablesChaosPro provides several predefined variables on class level. Some of these variables are used as parameters from outside, i.e. they are initialized by the fractal calculation routine and the corresponding interface function inside the class is expected to use the variable in order to provide a result depending on that variable. ExampleThe following (small) formula uses only predefined variables, i.e. z and pixel: my_formula { void init(void) { z=0; // z is a predefined (complex) variable, you should use it as the main iteration variable... } void loop(void) { // a variable called "pixel" has been predefined and // contains the complex number which corresponds to the current pixel. z=z*z+pixel; } bool bailout(void) { return(cabs(z)<4); } }Notes:
|