For an in-depth look at just what lies within the Mandelbrot set, check this out. (Youtube video, kinda trippy, all math.)
The way the Mandelbrot Sequence works is just defining whether or not certain coordinates are within or without the Mandelbrot Set, and for visualization, the 'closeness' of a value to being in the set if it is not in the set corresponds to a fading color. (If in set, you're black; if near set, you're a gradient of some color that fades to black.)
The Mandelbrot Sequence is defined by iterating over a simple equation, and if, after infinite iterations on the starting coordinates, the values approach infinity, then it is not in the set. If the value is bounded, then it is in the set. We define the 'closeness' of a value outside the set as how many iterations it made before 'leaving' the set, according to the following equation:
For some original Complex value C (of the form a + bi; a is the real value, b is the complex), let Z = C. For each iteration, the next Z value is equivalent to the previous one squared plus the original C value. Zn = (Zn-1)^2 + C, in nicer format. So, if after theoretically infinite but more likely a large bound such as 200 iterations of performing this, if Zn is still within a certain range (say, 2), then we assume it will not go to infinity and is in the set. Otherwise, take however many iterations it completed as an argument to calculating the gradient color.
That's kinda mathy, which isn't everybody's thing, but relative to a lot of other math stuff, this really simple bit of math creates a beautiful pattern that, if you already looked at that youtube video up above, will mesmerize you for a good 10-15 minutes.
So, this program is just a little viewer of the Mandelbrot Sequence, giving a pretty visualization of it and letting you zoom in a bit. (Not to the degree of the video, but a fair bit.) It also has some custom functions, such as corruptions of the Mandelbrot set for the sake of seeing cool stuff, and the ability to print the image out to your file system for usage however you like.
Not the biggest program I've made, but still pretty cool and something I quite like! (If the Mandelbrot Set has piqued your interest, check out the three-dimensional visualization called the Mandelbulb Set. It gets freaky and awesome.)
Anyways, hope you're enjoying this trickle of what I've been doing for the past couple of semesters, and see you sometime soon for whatever else I've got that I wanted to post instead of studying for finals or finishing that one project I need to get a move on! Have a lovely day!
Mandelbrot Viewer by Mac Clevinger, April 9, 2018
![](http://www.weebly.com/weebly/images/file_icons/file.png)
MandelbrotViewer.jar |