From 31f7a62fdfe5bad13545de011f822bf80ec8db20 Mon Sep 17 00:00:00 2001 From: Anton Lydike Date: Mon, 16 Mar 2020 10:19:02 +0100 Subject: [PATCH] took sqrt of iterations in color calc to brighten glow --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index d08acd7..448070b 100644 --- a/main.c +++ b/main.c @@ -1,6 +1,7 @@ #include #include #include +#include #include #include @@ -66,7 +67,7 @@ void draw_mandelbrot(int width, int height, int iterations) { //int g = (ret * 9 / iterations); //int b = (ret * 165 / iterations); //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); } }