Plotting Mandelbrot

There are many sites discussing the Mandelbrot Set, but not many examples using VBA to plot the set in Excel, so here is my effort:

The spreadsheet (including open source VBA code) may be downloaded from:

Mandelbrot chart.zip

Note that to keep the download file a reasonable size the file has been saved with a low resolution image.  350 x 350 resolution gives a good compromise between image quality and speed of processing and plotting.

Required input is:

  • Centre point coordinates
  • Plot width (= height)
  • Plot resolution
  • Number of iterations

The results are plotted as a scatter chart  with 7 data ranges, plotting markers only.

The plot below was generated with 28 iterations, and a resolution of 350×350.  Calculation time was 0.33 seconds:

The second example was taken from:

How To Quickly Compute The Mandelbrot Set In Python

Higher resolution (1000×1000) with 2048 iterations resulted in much longer calculation time, but times are 2-3 times faster than the plain Python code given in the link:

For faster plotting compiled code is required.  A good site providing fast high resolution plots for user selected location, scale and number of iterations is:

Mandelbrot Set

The site text says the plots will not work in Microsoft browsers, but they worked with no problem for me in Internet Explorer.  The image below was generated in the spreadsheet using parameters from the link above.

This entry was posted in Charts, Charts, Coordinate Geometry, Drawing, Excel, Maths, Newton, VBA and tagged , , , . Bookmark the permalink.

3 Responses to Plotting Mandelbrot

  1. Afazio says:

    Ciao Dougs,
    ti scrivo in italiano sperando che sia a te comprensibile.
    Ho letto il tuo interessante topic sui frattali di Mandelbrot e volevo segnalarti che ti ho citato in un mio topic in cui parlo di frattali.
    https://bar-ingegneria.forumfree.it/?t=76887762&st=30#entry634491871
    Se vuoi intervenire anche nel sito che ti ho segnalato sei certamente gradito.
    In quel sito spesso facciamo riferimento ai tuoi notevoli lavori.

    Un caro saluto dalla sicilia.
    Afazio.

    Like

    • dougaj4 says:

      Thanks for the interest, and sorry for the reply in English!
      I have now uploaded a new version with FullSeriesCollection changed to SeriesCollection, 16 colour ranges, and marker colours set with RGB values. At the moment the colours are hard-coded in VBA, but I will change that to allow the colours to be read from the spreadsheet.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.