aboutsummaryrefslogtreecommitdiff
path: root/header.h
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2019-09-22 11:44:30 +0200
committerCharles <sircharlesaze@gmail.com>2019-09-22 11:44:30 +0200
commitc5008a4e62fb83eb71f5f94f622c01f2d8fe8b6b (patch)
tree02d1f84aca29c95e999156848a86d61c292b7208 /header.h
parent5efde1e3e65af769cb629d55f0a4dd4f87caebe9 (diff)
downloadmandelbrot_cpu-c5008a4e62fb83eb71f5f94f622c01f2d8fe8b6b.tar.gz
mandelbrot_cpu-c5008a4e62fb83eb71f5f94f622c01f2d8fe8b6b.tar.bz2
mandelbrot_cpu-c5008a4e62fb83eb71f5f94f622c01f2d8fe8b6b.zip
Supersampling
- Random supersampling (prettier but quite slow) - WIP: bette color gradient
Diffstat (limited to 'header.h')
-rw-r--r--header.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/header.h b/header.h
index fbaca08..92b4d83 100644
--- a/header.h
+++ b/header.h
@@ -4,8 +4,8 @@
# include <stdbool.h>
# include <SDL2/SDL.h>
-# define MAX_ITERATION 210
-# define ESCAPE_RADIUS 2
+# define MAX_ITERATION 200
+# define ESCAPE_RADIUS 10
# define ESCAPE_RADIUS_SQUARED (ESCAPE_RADIUS * ESCAPE_RADIUS)
# define PIXELS_CHANELS 3
@@ -62,6 +62,7 @@ typedef struct
{
double real_lo;
double real_hi;
+ double imag_step;
int width;
double imag;
Color *palette;
@@ -81,6 +82,7 @@ void graphics_run(GState *state);
// helper.c
double map_range(double x, double src_lo, double src_hi, double dest_lo, double dest_hi);
-int *inclusive_range(int start, int end);
+Color helper_HSL_to_RGB(int hue, double saturation, double lightness);
+double double_rand(void);
#endif