GitHub Page

Thursday, March 4, 2021

Mandelbrot Set Visualization

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.


details 1




details 2