Interactive fractal viewer for the Mandelbrot and Julia sets

Mandelbrot and Julia set viewer with C subfunction with up to 1E10x zoom with pan enabled.
1,5K Downloads
Aktualisiert 5 Mai 2011

Lizenz anzeigen

The Mandelbrot set is a set of complex numbers C where z_n+1 = z_n^2 + c (z_0 = 0) does not diverge for all c in the set C. The image is generated by calculating the number of iterations until |z_n| is larger than a certain escape radius. Of course, since some points will never diverge, a limit of the number of iterations is required.

The function used for the Julia set is the simple monic quadratic function. This Julia set is similar to the Mandelbrot set in that it uses a similar form. But, this time, it is the set of complex numbers C where z_n+1 = z_n^2 + d does not diverge for all c in the set C given that z_0 = c. The variable d is constant and complex.

To plot the sets, the viewer uses a set of datapoint as c in the Mandelbrot set case, or z_0 in the Julia set case, and generates a color for each datapoint that depends on the number of iterations needed for divergence.

With this code, you can zoom in up to 1E10x and out, and pan around as if viewing a regular plot. After each zoom or pan action, the set is recalculated given the new plot boundaries view using a C subfunction (a matlab subfunction is also provided).

To view the Mandelbrot using default settings, simply run main(). For the Julia set, use main('FractalType','Julia').

The function main also accepts other Parameter-Value pairs. For the list of all properties, see the function header.

Future additions include adding a GUI to change the maximum number of iterations.

Zitieren als

Christopher (2024). Interactive fractal viewer for the Mandelbrot and Julia sets (https://www.mathworks.com/matlabcentral/fileexchange/29118-interactive-fractal-viewer-for-the-mandelbrot-and-julia-sets), MATLAB Central File Exchange. Abgerufen .

Kompatibilität der MATLAB-Version
Erstellt mit R2009a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Fractals finden Sie in Help Center und MATLAB Answers
Quellenangaben

Inspiriert von: Mandelbrot set vectorized

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

fractalv03/

Version Veröffentlicht Versionshinweise
1.4.0.0

Added missing "const" to function argument.

1.3.0.0

Added Julia sets and inputParser.

1.2.0.0

Added Julia sets and inputParser.

1.1.0.0

Updated input parameter checking. Added more comments. Improved image cache system.

1.0.0.0