Starting from:
$30

$27

Mandelbrot Image Generator Requirements

Mandelbrot Image Generator Requirements
Your task is to write a C++ program that generates a Mandelbrot bitmap image. Your program must
comply with the following criteria:
1. Information on bitmap (.bmp) image file format can be found here (pay special attention to
Example 1). The image shall be as follows:
a. 8000 pixels by 4571 pixels
b. 24-bit RGB color
c. A 14-byte bitmap file header (represent as a C++ STL array)
d. A 40-byte DIB header (represent as a C++ STL array)
e. The entire file shall be exactly 109,704,054 bytes in size
f. REMEMBER: a bitmap (.bmp) file is a binary file, not a text file
g. The image the program produces will be named mandelbrot_x.bmp, where x is
a value between 1 and 3 (see below).
2. Study the Mandelbrot Set description on Wikipedia. There is an included piece of
pseudocode that will prove invaluable to your program development.
a. Set your max_iteration to 1000
b. The Mandelbrot X (or real) scale is (-2.5, 1)
c. The Mandelbrot Y (or imaginary) scale is (-1, 1)
d. The code will take several seconds (or possibly minutes) to run. Adding print
statements inside your loop will show progress.
e. When assigning colors, generate a random number to let the program select
between 3 different color schemes (named 1, 2, and 3). This digit becomes part of
the file name. The selection of color schemes is up to you as the programmer.
3. You must use the following C++ STL libraries in your code
a. <array (including appropriate iterators) to hold your 2 bitmap file headers
b. <random to generate the random number between 1 and 3
c. Extra Credit (5 pts) <complex to represent pixels (rather than x and y as found in
the pseudocode example)
4. Submit to Canvas as a single zip file
a. All source files
b. mandelbrot_1.bmp
c. mandelbrot_2.bmp
d. mandelbrot_3.bmp

More products