-
Notifications
You must be signed in to change notification settings - Fork 0
/
fracts.c
58 lines (55 loc) · 1.49 KB
/
fracts.c
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* fracts.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: zessadqu <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/19 00:52:46 by zessadqu #+# #+# */
/* Updated: 2022/08/04 09:14:29 by zessadqu ### ########.fr */
/* */
/* ************************************************************************** */
#include "fractol.h"
void julia(t_fract *t)
{
t->y_real = 0;
while (t->y_real < WIDTH)
{
t->x_real = 0;
while (t->x_real < HIGHT)
{
t->iter = 0;
map_julia(t);
looping(t);
if (t->iter == t->max)
set_color(t, 0);
else
set_color(t, 1);
t->x_real++;
}
t->y_real++;
}
my_mlx_hook(t);
}
void mandelbrot(t_fract *t)
{
t->y_real = 0;
while (t->y_real < HIGHT)
{
t->x_real = 0;
while (t->x_real < WIDTH)
{
t->iter = 0;
map(t);
looping(t);
if (t->iter == t->max)
set_color(t, 0);
else
set_color(t, 1);
t->x_real++;
}
t->y_real++;
}
t->stop = 1;
my_mlx_hook(t);
}