Skip to content

A multi-threaded Mandelbrot Fractal Explorer written in C++, rendered using SFML

License

Notifications You must be signed in to change notification settings

Orbital-Web/MandelbrotExplorer

Repository files navigation

MandelbrotExplorer

A Mandelbrot Fractal Explorer written in C++ and SFML, and Thread Pools. It can view up to a zoom (pixel width) of 10^-16 before encountering floating point errors (although this could be increased using long double at the cost of speed and inconsistency across compilers).

a 1080x1080 render at a zoom of 10^-4.66 and a max iteration of 576, rendered in 0.330s

Features

  • Customizable size, max iteration count, iteration increment on zoom, scale factor when zooming, and period checking frequency. These can be set with command-line arguments. For more details, run main.exe --help.
  • Zoom in/out with the mouse scroll wheel. It will place the region the mouse was over when scrolling at the center of the window after the zoom.
  • Increase/decrease maxiter with any of the arrow keys or with the numpad + and - keys.

Here are the list of optimizations and improvements implemented, taken mostly from this Wikepedia article:

  • Normalized iteration count
  • Continuous coloring
  • Cardoid checking
  • Periodicity checking
  • Multithreading

Getting Started (Windows)

  1. Clone the repository
  2. Install g++
  3. Download SFML-2.6.0 (GCC MinGW) from https://www.sfml-dev.org/download/sfml/2.6.0/ and add it to the root directory
  4. Compile and run main.exe with the following commands
    g++ -c main.cpp -ISFML-2.6.0/include -DSFML_STATIC
    g++ -o main main.o -LSFML-2.6.0/lib -lsfml-graphics-s -lsfml-window-s -lsfml-system-s -lopengl32 -lwinmm -lgdi32
    del main.o
    main.exe
    

About

A multi-threaded Mandelbrot Fractal Explorer written in C++, rendered using SFML

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages