CHAPTER 4
Fractal Symmetry
for (int i = 0; i ≤ 500; i++) { for (int j = 0; j ≤ 500; j++) { x = 0.0; y = 0.0; xs = -2.5 + (i / 100.0); ys = -2.5 + (j / 100.0); k = 0; do { k = k + 1; xnew = x*x - y*y + xs; ynew = 2.0*x*y + ys; x = xnew; y = ynew; } while ((k ≤ kmax) && (x*x + y*y ≤ 6.25)); PlotPixel(i, j, color); } }Asymmetric Mandelbrot Set with Pseudocode
for (int i = 0; i ≤ 500; i++) { for (int j = 0; j ≤ 500; j++) { x = 0.0; y = 0.0; xs = -2.5 + (i / 100.0); ys = -2.5 + (j / 100.0); k = 0; do { k = k + 1; xnew = x*x - x*y + xs; ynew = 2.0*x*y + ys; x = xnew; y = ynew; } while ((k ≤ kmax) && (x*x + y*y ≤ 6.25)); PlotPixel(i, j, color); } }
Mandelbrot | Build: (f(x,y), g(x,y)) | Escape: h(x,y)>value | Plot |
---|---|---|---|
Symmetric (Basic) Mandelbrot Set | (x² - y², 2.0*x*y) | x² + y² > 6.25 | Pixel |
Symmetric Mandelbrot Variant #1 | (x² - y²-x, 2.0*x*y) | x² + y² > 6.25 | Pixel |
Symmetric Mandelbrot Variant #2 | (x² + x*y², y*x²) | x² + y² > 6.25 | Pixel |
Symmetric Mandelbrot Variant #3 | (x²*y, x²*y) | x² + y² > 6.25 | Pixel |
Asymmetric Mandelbrot Set | (x² - y*x, 2.0*x*y) | x² + y² > 6.25 | Pixel |
Asymmetric Mandelbrot Variant #1 | (x²-y²-y, 2.0*x*y) | x² + y² > 6.25 | Pixel |
Asymmetric Mandelbrot Variant #2 | (x*y + x²*y, y*x²) | x² + y² > 6.25 | Pixel |
Asymmetric Mandelbrot Variant #3 | (x²*y, x*y²) | x² + y² > 6.25 | Pixel |
Mandelbrot Variation Sample with Pseudocode and Symmetric Map
Here is a Mandelbrot variation with build (xmx*ymy, xnx*yny) where mx, my, nx, ny were incremented for each figure.
Exponents ranged from 0 to 4 and yielded 5⁴ or 625 figures.
Each figure's symmetry was examined and a map created showing whether each figure was symmetric or asymmetric.
for (int i = 0; i ≤ 300; i++) { for (int j = 0; j ≤ 300; j++) { x = 0.0; y = 0.0; xs = -2.0 + (i / 75.0); ys = -2.0 + (j / 75.0); k = 0; do { if (mx == 0 && my == 0) xnew = xs; else xnew = xmx*ymy + xs; if (nx == 0 && ny == 0) ynew = ys; else ynew = xnx*yny + ys; x = xnew; y = ynew; k = k + 1; } while ((k ≤ kmax) && (x*x + y*y ≤ 4.0)); PlotPixel(i, j, color); } }
The Symmetric Map shows figure results where:
asymmetric figures are red and symmetric figures are white.
xmx*ymy is shown as row and xnx*yny is shown as column.
For example, the following yields a symmetric figure:
mx = 3, my = 2, is along the left side as 32.
nx = 4, ny = 3, is along the top as 43.
Real: x³*y²
Imaginary: x⁴*y³
for (int i = 0; i ≤ 500; i++) { for (int j = 0; j ≤ 500; j++) { xs = 0.39; ys = 0.36; x = -2.5 + (i / 100.0); y = -2.5 + (j / 100.0); k = 0; do { k = k + 1; xnew = x*x - y*y + xs; ynew = 2.0*x*y + ys; x = xnew; y = ynew; } while ((k ≤ kmax) && (x*x + y*y ≤ 6.25)); PlotPixel(i, j, color); } }Asymmetric Julia Set with Pseudocode
for (int i = 0; i ≤ 500; i++) { for (int j = 0; j ≤ 500; j++) { xs = 0.39; ys = 0.36; x = -2.5 + (i / 100.0); y = -2.5 + (j / 100.0); k = 0; do { k = k + 1; xnew = x*x - y + xs; ynew = 2.0*x*y + ys; x = xnew; y = ynew; } while ((k ≤ kmax) && (x*x + y*y ≤ 6.25)); PlotPixel(i, j, color); } }
Julia | Build: (f(x,y), g(x,y), (xs,ys)) | Escape: h(x,y)>value | Plot |
---|---|---|---|
Symmetric (Basic) Julia Set | (x² - y², 2.0*x*y), (0.39, 0.36) | x² + y² > 6.25 | Pixel |
Symmetric Julia Variant #1 | (x²-x*y², 2.0*x), (0.39, 0.36) | x² + y² > 6.25 | Pixel |
Symmetric Julia Variant #2 | (x-y², x²*y²), (0.39, 0.36) | x² + y² > 6.25 | Pxel |
Symmetric Julia Variant #3 | (x-y², y*x²), (0.39, 0.36) | x² + y² > 6.25 | Pixel |
Asymmetric Julia Set | (x² - y, 2.0*x*y), (0.39, 0.36) | x² + y² > 6.25 | Pixel |
Asymmetric Julia Variant #1 | (x²-x*y², 2.0*y), (0.39, 0.36) | x² + y² > 6.25 | Pixel |
Asymmetric Julia Variant #2 | (x-y², x²*y), (0.39, 0.36) | x² + y² > 6.25 | Pixel |
Asymmetric Julia Variant #3 | (x-y, x*y²), (0.39, 0.36) | x² + y² > 6.25 | Pixel |