This file is the core backend for generating fractals. It can either be run by itself or be triggered by a GUI. A few interesting features of this are:

Note that if you want to run it then you will need to change the path. In addition you will either need to create a history.csv with the necessary columns, or hard code the parameters in code. Alternatively, you can use the orchestration tool below instead of modifying the code, but you will still need to modify the paths. The orchestration tool runs a flask program that allows one to run iterative_fractals.py with new parameters. Below the code you can see the landing page for the front-end. 

Function defines the iterated function, e.g z^2+c for the mandelbrot set. Transform is a function of just z, which transforms the complex plane before iteration. Change the position of the image with Center. 

Coloring Method is a toggle to either use the color palette to color points or the image palette to color points by sampling from images in the Palettte Folder. Palette Scale defines how large the palette photos are scaled. The fractal size is related to the image size by Pallette scale, using the equation 2^Pallette Scale. E.g 1 will create a fractal twice the the size of the images, while 2 will create a fractal 4 times the size as the images. Note the images must be the same size. 

Color Transform permutes the iteration index, and should be a function of i, z, and c. 

The colors are selected on sliders, and how much of the color is chosen by the color length. I need to adjust the sizes dynamically so it renders well on different displays. 

Maximum Iterations simply restricts how many times it will iterate before assuming the point has converged. Zoom is how magnified the image is, and is just a positive integer to positively magnify. Render Scale is how large the output image will be. Display size is how large the displayed image will be. Finally, videos can be generated when there is the index {n} embedded in the function or transformation. 

Transform to spiral:  z*(np.cos(3*abs(z))+1j*np.sin(3*abs(z)))