DEVELOPMENT ENVIRONMENT

~alex/mandelbrot-set-gen

ref: 797e30a9b3b99cce8c6da581457fa599c359b26f mandelbrot-set-gen/include/mandelbrot.h -rw-r--r-- 738 bytes
797e30a9Alejandro Laguna feat: show values on text a month ago
                                                                                
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
#ifndef MANDELBROT_H
#define MANDELBROT_H

#include "SDL3/SDL.h"

// TODO: GPU shadering option
// TODO: flexible window size
// TODO: maybe? change colors

#define WINDOW_TITLE "Mandelbrot Visualization"
#define WINDOW_WIDTH 800
#define WINDOW_HEIGHT 600

typedef struct position_s {
    double x_min;
    double x_max;
    double y_min;
    double y_max;
} position_t;

// math.c
int mandelbrot_iterations(double cr, double ci, int max_iter);
void calculate_points(position_t* pos);
void mandelbrot_at_point(double cr, double ci, int* iter_out, double* zr_out, double* zi_out);

// draw.c
// TODO: color struct or something
void get_color(int iter, int max_iter, int* r, int* g, int* b);
void draw_points(SDL_Surface* surface);

#endif