Attractor - Pixel TransformationsPixel transformation formulas (i.e. iteration formulas) are the most important formulas in ChaosPro: They calculate a new 3D point based on another 3D point, in other words: They take the 3D point present in the variable z and somehow calculate a new 3D point and assign it to z. So this formula is responsible for the complexity of the fractal, i.e. the detail level and its shape. How the next 3D point actually is calculated is completely upto the formula author. Such a pixel transformation formula can contain the following functions:
In order to tell ChaosPro that this formula is ment for fractal type Attractor (and thus the proper predefined variables are defined), you need to specify the keyword ATTRACTOR 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. ExamplePickover(ATTRACTOR) { parameter real A,B,C,D; real xNew,yNew,zNew; real xO,yO,zO; shared vector zOld; void init(void) { z=(1,1,1); } void loop(void) { zOld=z; xO=partx(z); yO=party(z); zO=partz(z); xNew=sin(A*yO)-zO*cos(B*xO); yNew=zO*sin(C*xO)-cos(D*yO); zNew=sin(xO); z=vector(xNew,yNew,zNew); } bool stop(void) { return(false); } void description(void) { this.title="Pickover"; this.helpfile = "ChaosPro.chm"; this.helptopic = "Iteration Formula"; this.maxiter=20000; A.caption="A"; A.default=1; A.randomizable=true; A.min=-3; A.max=3; B.caption="B"; B.default=1.8; B.randomizable=true; B.min=-3; B.max=3; C.caption="C"; C.default=0.71; C.randomizable=true; C.min=-3; C.max=3; D.caption="D"; D.default=1.51; D.randomizable=true; D.min=-3; D.max=3; } } |