I'm working on a Java project to create a graph visualization for the famous Mandelbrot set. The logic is fairly straightforward, but I have difficulty finding a way to determine if a series converges or not- without burning out the computer CPU. What's even trickier is to determine the speed of divergence/convergence and color it accordingly.
[3/8/2021] Update: I finish the programming for the graphic-making part, and now it's time to improve my algorithm! The below image uses a very primitive method but it's the first one and is still exciting. Basically, for a point on the complex plane, I calculate the difference between two consecutive terms for the first 5 terms and sum the difference. If the sum is negative (decreasing on average), the point is black; if positive, then the value of the sum is used as the RGB code numbers. If exceeding 255, the point will be white.
[Hours later]
Here it is! I didn't even understand what I was doing on the last one. For a series to converge, we only need that at infinity two consecutive terms will be infinitely close. Here I compare the absolute difference between the 15th and 16th terms, and the absolute difference is the value of the RBG code. Again exceeding 255 will be white.
[3/9/2021]
Absolute difference between 30th and 31st terms < 10 is black, else is white.
[final update]
In May I used the escape time algorithm found online; meanwhile I enable the "zooming in & out" function.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVEtBHY7NUQdrE7C5yC7u0p4BGh0dx8hKub9LFyrJ-uLeQbSYQrffRgz0oVp9CmzzhFfm2QN_BKs4-QX6BZGDZx6ffgTcoX8Ixns7C31nCpJhuliw_-UoAJcTfpe4r-PXyQOyT3c4Ls6eN/w499-h488/lol.png) |
details 1 |
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaeGNMQJ3-LyZ0UgRgiDJ2yjM0rtBIER5rLgGPkumamF8qZep3ZjPUyO4AjnfOf2Sue691Nrgik8n0UdB0K0A_VKwkIs9PdrPiPWjeFDSZ_5u6Xmg1pgHBd4TUwPC62IjYwAYeGEKkh3T-/w499-h487/89%257DZ%2540I3GXIAMQ%257DTMG0J_R28.png) |
details 2 |