Skip to content

Commit 4214ca6

Browse files
committed
Update main.cpp
1 parent 1ff84c7 commit 4214ca6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Fractal Images/main.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ int main() {
2323
double max = -99999;
2424

2525
unique_ptr<int[]> histogram(new int[Mandelbrot::MAX_ITERATIONS]());
26+
unique_ptr<int[]> fractal(new int[WIDTH * HEIGHT]());
27+
2628

2729
for (int y = 0; y < HEIGHT; y++) {
2830
for (int x = 0; x < WIDTH; x++) {
@@ -31,6 +33,7 @@ int main() {
3133

3234
int iterations = Mandelbrot::getIteration(xFractal, yFractal);
3335

36+
fractal[y * WIDTH + x] = iterations;
3437

3538
if (iterations != Mandelbrot::MAX_ITERATIONS) {
3639

@@ -50,7 +53,6 @@ int main() {
5053
}
5154
}
5255

53-
cout << endl;
5456

5557
int count = 0;
5658
for (int i = 0; i < Mandelbrot::MAX_ITERATIONS; i++) {
@@ -62,7 +64,6 @@ int main() {
6264

6365
cout << endl;
6466

65-
cout << min << " " << max << endl;
6667

6768
bitmap.write("test.bmp");
6869

0 commit comments

Comments
 (0)