DEVELOPMENT ENVIRONMENT

~alex/mandelbrot-set-gen

ref: bf35da7ecc554f8f5fdacdc3df432424c8a68783 mandelbrot-set-gen/include/mandelbrot.h -rw-r--r-- 644 bytes
bf35da7eAlejandro Laguna feat: move around using the mouse 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);

// 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