This can render any Newton fractal that can be generated from a polynomial. Please read all instructions before beginning. Step 1: Making a fractal: Choose the number of roots you want. Pick any natural number greater than 1. The original placement of the roots is for z^n-1, but you can drag them to where ever you want on screen, or used asdw for more precise movement. Press up/down to if you would like to make a give root a repeated root (choose how may times repeated) Press f to generate the fractal. Step 2: Interacting with the fractal. Press C to enter complex point mode. This allows you to click on a point to determine the value of the point in the complex plane. Press T to enter Trace mode: This will create a dynamic path which will show how the point where your mouse is travels to its associated root. (This works best in full screen) Pressing "Z" will turn zoom in mode on. Clicking on points now will zoom in (by a factor of 2) on the point you clicked. Pressing "X" will turn zoom in mode out. Clicking on points now will zoom out on the point you clicked. The initial render is "quick" low res render. Once a render is complete you can press SPACE to render it at a higher resolution (16 times slower)
Next steps: I am currently working on a GUI for this project. Any suggestions for features that should be added would be great. Notes: This slows down when any of the 3 things happen. 1) increasing the number of roots, 2) increasing the how many times roots are repeated, 3) placing roots near each other (this is because I am dynamically choosing a threshold of how close a solution needs to get to a root in order to "converge" based on the distance between roots. Math summary: Newton's method is an iterative process to solve equations f(z)=0. The process uses initial starting point to (usually) give an approximation of a solution to the equation. This project is solving a polynomial based on the where you place the n roots. There are n solutions, hence n colors. Each point in the picture represents a point in the complex plane and is colored by which solution that point approaches. Each color is called a basin of attraction. The darkness is determined by how many iterations it takes to approach the root. Darker means it takes longer. For more details: https://en.wikipedia.org/wiki/Newton%27s_method has an excellent version of this and inspired me to use low res for zooming until you reach a point where you want a high res picture. Check out their project.