From 322c1a49f59d3fc6441804bbbb29da22567e4bcb Mon Sep 17 00:00:00 2001 From: Charles Date: Wed, 20 May 2020 16:53:25 +0200 Subject: Correct resize, linear iterpolation draft --- inc/config.h | 15 +++++++++++++-- inc/mandel.h | 6 ++++++ 2 files changed, 19 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/config.h b/inc/config.h index c336c51..680d893 100644 --- a/inc/config.h +++ b/inc/config.h @@ -1,9 +1,20 @@ #ifndef CONFIG_H # define CONFIG_H -# define MANDEL_WINDOW_WIDTH 640 -# define MANDEL_WINDOW_HEIGHT 480 +# include "mandel.h" + +# define MANDEL_WINDOW_WIDTH 400 +# define MANDEL_WINDOW_HEIGHT 400 # define MANDEL_WINDOW_TITLE "Mandelbrot" # define MANDEL_ITERATIONS 50 +static ControlPoint g_theme[] = { + {0.0, {0x00, 0x0F, 0x64} }, + {0.16, {0x20, 0x6B, 0xCB} }, + {0.42, {0xED, 0xFF, 0xFF} }, + {0.6425, {0xFF, 0xAA, 0x00} }, + {1.0, {0x00, 0x02, 0x00} }, + // {0.8575, {0x00, 0x02, 0x00} }, +}; + #endif diff --git a/inc/mandel.h b/inc/mandel.h index 0383a39..a2af137 100644 --- a/inc/mandel.h +++ b/inc/mandel.h @@ -56,6 +56,12 @@ typedef struct double y; } Point; +typedef struct +{ + float position; + Color color; +} ControlPoint; + typedef struct { unsigned int id; -- cgit