This project generates a Mandelbrot set image (and a third-order Mandelbrot set image) according to specifications from user input.
- cmake >= 3.7
- All OSes: click here for installation instructions
- make >= 4.1 (Linux, Mac), 3.81 (Windows)
- Linux: make is installed by default on most Linux distros
- Mac: install Xcode command line tools to get make
- Windows: Click here for installation instructions
- gcc/g++ >= 5.4
- Linux: gcc / g++ is installed by default on most Linux distros
- Mac: same deal as make - install Xcode command line tools
- Windows: recommend using MinGW
Make sure that the C++ FreeImage library is installed as well.
The project consists of the following files:
Window.h
- Creates a "window" for the image to be generated.SaveImage.cpp
- Plots the pixels of the image and saves it to a file.SaveImage.h
- Header file forSaveImage.cpp
.main.cpp
- Runs the program.
- The project demonstrates an understanding of C++ functions and control structures. The
SaveImage.cpp
andmain.cpp
files are divided into functions. Anif-elseif-else
statement is used in thevoid() get_rgb_smooth()
function inSaveImage.cpp
. - The project reads data from a file and process the data, or the program writes data to a file. In
void plot()
inSaveImage.cpp
, the FreeImage library is used to write PNG files of the Mandelbrot set. - The project accepts user input and processes the input. In the
main()
function inmain.cpp
, users are allowed to input the size and color(s) of the Mandelbrot sets generated. - The project uses Object Oriented Programming techniques. In the
Window.h
file, a classWindow
is declared. - Classes use appropriate access specifiers for class members. In the
Window.h
file, class members are specified aspublic
andprivate
. - Class constructors utilize member initialization lists. In the
Window.h
file, a member initialization list is used in theWindow()
constructor.
- Clone this repo.
- Make a build directory in the top level directory:
mkdir build && cd build
- Compile:
cmake .. && make
- Run it:
./Capstone
. - Follow the instructions.
- View generated images in the
/build/
folder.