APPENDIX H
Line Variations
See Appendix D for similar Mandelbrot Tile Variations.
- xnew = f(x, y)
- ynew = g(x, y)
- escape = h(x, y, k)
- k = iteration count
Example Lines with Pseudocode
for (int i = 0; i ≤ 800; i++) { oldk = 0; for (int j = 0; j ≤ 800; j++) { x = 0.0; y = 0.0; xs = -4.0 + (i / 100.0); ys = -4.0 + (j / 100.0); k = 0; do { k = k + 1; xnew = -x * x * y * y + xs; ynew = y * x * x + ys; x = xnew; y = ynew; } while ((k ≤ kmax) && (|x|+|y| ≤ 16.0/k)); if (k != oldk) PlotPixel(i, j, color); oldk = k; } } for (int j = 0; j ≤ 800; j++) { oldk = 0; for (int i = 0; i ≤ 800; i++) { x = 0.0; y = 0.0; xs = -4.0 + (i / 100.0); ys = -4.0 + (j / 100.0); k = 0; do { k = k + 1; xnew = -x * x * y * y + xs; ynew = y * x * x + ys; x = xnew; y = ynew; } while ((k ≤ kmax) && (|x|+|y| ≤ 16.0/k)); if (k != oldk) PlotPixel(i, j, color); oldk = k; } }
Line | Build: (f(x, y), g(x, y)) | Escape: h(x, y, k) > value |
---|---|---|
Example | (-x * x * y * y, y * x * x) | |x| + |y| > 16.0 / k |
Lines #1 | (y - sin(y * y), x - x * x + ys) | (x * x * |x| + y * y * |y| > 36.0 / k |
Lines #2 | (x + cos(x * x * y - x) + xs, y + sin(x * y)) | x * x + y * y > 16.0 |
Lines #3 | (-x * y * y, -y * x * x) | |x| + |y| > 16.0 / k |
Lines #4 | (y - sin(x * y), x - (y * x)) | x * x * |x| + y * y * |y| > 60.0 / k |
Lines #5 | (-x * y * y + 0.5 * x, -y * x * x + 0.5 * y) | |x| + |y| > 16.0 / k |
Lines #6 | (y - (x * y), (x - (y * x)) | x * x * |x| + y * y * |y| > 60.0 / k |
Lines #7 | (x * y * y, -x * y * x) | x * x + y * y + |y| > 16.0 / k |
Lines #8 | (x - x * y * y, y - x * y * x) | x * x + y * y + |y| > 16.0 / k |
Lines #9 | (x - cos(x) * y * y, y - sin(x) * y * x) | x * x + y * y + |y| > 16.0 * k * k |
Lines #10 | (-x * y * y, x * y * x) | x * x + y * y + |y| - |x| > 16.0 |
Lines #11 | (-x * y * y + x, -y * x * x + x) | |x| + |y| > 16.0 / k |
Lines #12 | (-x * y * y - y, -y * x * x + x * y) | |x| + |y| > 16.0 / k |