CodingTrain / CodingTrain/Suggestion-Box
Root-Finding Fractals
- Dominant language
- No language data
- Stars
- 570
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
Yes, two others have already suggested Newton Fractals #1696 and #1626 while also referring to 3b1b's video on the subject [https://www.3blue1brown.com/lessons/newtons-fractal](https://www.3blue1brown.com/lessons/newtons-fractal), but there is a bigger picture that folks (including Grant) are missing. Newton's method $x_{n+1}=x_n\frac{f(x_n)}{f'(x_n)}$ is not the only method for finding roots nor is it the only way to make these kinds of fractals.
With one change you can go from:

to

to

to

All by making minor changes to the iteration function like Halley's Method, Householder's Method, or Jenkins-Traub. These were all essentially different methods of solving $z^3-1=0$.
If you change the input function to something like $z^8-15z^4-16=0$ and include a scaling factor you get:

I was just coloring on if it converged or not, but you can also color based on which root it finds such as:

The code that generated these images is available via [https://github.com/osveliz/numerical-veliz](https://github.com/osveliz/numerical-veliz) shared by the author (me) and they are very small programs. I have a Numerical Analysis [YouTube channel](https://www.youtube.com/OscarVeliz) with 12k subscribers and I would appreciate a shout-out if you decide to use this. I made my original video on [Newton Fractals](https://youtu.be/MWD2A0Vg2V0), 3 years before 3b1b's version, but everyone watches that one now. If you would like to collaborate on something, I would be glad to work with you.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.