home *** CD-ROM | disk | FTP | other *** search
- barnsleyj2 {
- parameter complex start;
- parameter int test;
- parameter real bailout;
-
- void init(void)
- {
- z = pixel;
- }
- void loop(void)
- {
- if (real(z) * imag(start) + real(start) * imag(z) >= 0)
- {
- z = (z - 1) * start;
- }
- else
- {
-
- z = (z + 1) * start;
- }
- }
- bool bailout(void)
- {
- return((test == 0 && |z| <= bailout) || (test == 1 && sqr(real(z)) <= bailout) || (test == 2 && sqr(imag(z)) <= bailout) || (test == 3 && (sqr(real(z)) <= bailout && sqr(imag(z)) < bailout)) || (test == 4 && (sqr(real(z)) <= bailout || sqr(imag(z)) < bailout)) || (test == 5 && (sqr(abs(real(z)) + abs(imag(z))) <= bailout)) || (test == 6 && (sqr(real(z) + imag(z)) <= bailout)));
- }
- void description(void)
- {
- this.title = "Barnsley 2 (Julia)";
- this.maxiter = 149;
-
- start.caption = "Parameter";
- start.default = (0.6, 1.1);
-
-
- test.caption = "Bailout Test";
- test.default = 0;
- test.enum = "mod\nreal\nimag\nor\nand\nmanh\nmanr";
-
-
- bailout.caption = "Bailout value";
- bailout.default = 4.0;
- bailout.min = 1.0;
-
-
-
-
-
- }
- }
-
-
-