|
|
@ -1,6 +1,7 @@
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
#include <math.h>
|
|
|
|
#include <sys/wait.h>
|
|
|
|
#include <sys/wait.h>
|
|
|
|
#include <sys/mman.h>
|
|
|
|
#include <sys/mman.h>
|
|
|
|
|
|
|
|
|
|
|
@ -66,7 +67,7 @@ void draw_mandelbrot(int width, int height, int iterations) {
|
|
|
|
//int g = (ret * 9 / iterations);
|
|
|
|
//int g = (ret * 9 / iterations);
|
|
|
|
//int b = (ret * 165 / iterations);
|
|
|
|
//int b = (ret * 165 / iterations);
|
|
|
|
//image_set_px(img, x, y, r,g,b);
|
|
|
|
//image_set_px(img, x, y, r,g,b);
|
|
|
|
int color = 255 * ret / (float) iterations;
|
|
|
|
int color = 255 * sqrt(ret / (float) iterations);
|
|
|
|
image_set_px(img, x, y, color, color, color);
|
|
|
|
image_set_px(img, x, y, color, color, color);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|