aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/plotting.h
blob: d94c7bc49b1dbc34af3b9df8b1cc87858865ca82 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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(const size_t iterations, const size_t max_iterations, const gradient map);

// for SoA
char get_red(const size_t iterations, const size_t max_iterations, const gradient map);
char get_green(const size_t iterations, const size_t max_iterations, const gradient map);
char get_blue(const size_t iterations, const size_t max_iterations, const gradient map);
colors_t* create_colors(size_t x, size_t y);
colors_t* copy_colors(const colors_t* colors);
void free_colors(colors_t* colors);