Skip to content

Mateusz00/Mandelbrot-Set-MVC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

Java multithreaded application, using MVC design pattern, which allows users to generate beautiful fractals. It lets users to conveniently zoom in/out and move center by mouse or keyboard, generate images and videos of mandelbrot set. Download

Theory

Mandelbrot set is a set of points in the complex plane for which the orbit of zn doesn't tend to infinity. The iteration formula used in the Mandelbrot set is:

Z0 = 0
Zn+1 = Zn2 + C
Where C determines the location of the iteration series in the complex plane.

Calculating the Mandelbrot Set

  • If the magnitude of Z ever becomes larger than declared threshold value, we will assume that it will diverge into infinity.
  • If the number of iterations exceeds declared maximum iterations value, we will assume that Z doesn't tend to infinity.
  • We will speed up calculations by using Divide and Conquer approach, calculating each part of set in different thread (Can be easily implemented with Fork/Join in java)

Coloring the plot

In order to colorize the plot we take number of iterations performed and map that against a color spectrum.
Color smoothing equation can be found here: http://linas.org/art-gallery/escape/smooth.html

Zooming

Zooming is achieved by decreasing/increasing mandelbrot set range

Examples

Watch the video image of video settings image example01.png example03.png example05.png
Click here for more examples