Quaternion - Transformation FormulasA transformation formula transforms the quaternion space into another "space". This formula is rather simple to write and understand, because all it does - or better - has to do, is to modify the value of the predefined variable pixel. A transformation formula can have upto three member function:
In order to tell ChaosPro that this formula is ment for fractal type Quaternion (and thus the proper predefined variables are defined), you need to specify the keyword QUATERNION in brackets after the formula identifier. This tells ChaosPro that pixel and z are quaternion variables (instead of complex variables) and that the other predefined variables for this fractal type are defined. So a transformation mainly consists of a member function void transform(void) which gets called for each pixel before the main fractal loop gets called. Thus a transformation could look as follows: Displace(QUATERNION) { parameter quaternion c; void transform(void) { pixel=pixel+c; } void description(void) { this.title="Simple Displacement"; c.caption="Displace"; c.default=(0,0,0,0); c.hint="Displace by this number."; } } So all you need to do is to modify the predefined variable pixel in a way you like! |