diff options
| author | JP Appel <jeanpierre.appel01@gmail.com> | 2024-04-19 22:29:31 -0400 |
|---|---|---|
| committer | JP Appel <jeanpierre.appel01@gmail.com> | 2024-04-19 22:29:31 -0400 |
| commit | c1eb35ea06ba95a18d9ab4ff53ed3b67be35af8b (patch) | |
| tree | 2587470e6fda5f1f815d3b7ab67e71737ddafca8 /src/plotting.h | |
| parent | 625d99871e5d18e0aa54a95cfce2fa37e46b4095 (diff) | |
intial work on plotting functions
Diffstat (limited to 'src/plotting.h')
| -rw-r--r-- | src/plotting.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/plotting.h b/src/plotting.h new file mode 100644 index 0000000..9d72b69 --- /dev/null +++ b/src/plotting.h @@ -0,0 +1,31 @@ +#include <stddef.h> + +#pragma once + +typedef struct { + char red; + char green; + char blue; +} color; + +typedef struct { + size_t x; + size_t y; + size_t size; + char* red; + char* green; + char* blue; +} colors_t; + +typedef char gradient; + +// for AoS +color get_color(size_t iterations, size_t max_iterations, gradient map); + +// for SoA +char get_red(size_t iterations, size_t max_iterations, gradient map); +char get_green(size_t iterations, size_t max_iterations, gradient map); +char get_blue(size_t iterations, size_t max_iterations, gradient map); +colors_t* create_colors(size_t x, size_t y); +colors_t* copy_colors(colors_t* colors); +void free_colors(colors_t* colors); |
