-
Notifications
You must be signed in to change notification settings - Fork 1
/
fractal.h
49 lines (40 loc) · 970 Bytes
/
fractal.h
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
#ifndef fractal_h
#define fractal_h
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define USENORM2
#define BIG 1e10
#define TINY 1e-12
typedef struct _point {
double x;
double y;
} point;
typedef struct _matrix {
double a11, a12, a21, a22;
} matrix;
typedef struct _options {
int width;
int height;
double cx, cy, r;
double eps;
double kmax;
double dsol;
int simple;
} options;
void hsv_to_rgb (double H[3], double C[3]);
double det (matrix *M);
int solve (matrix *M, point *p);
double norm (point *p);
void print_point (point *p);
void initialize_options (options *opt);
void writefile (int max, options *opt);
void fractal (options *opt);
void parse_options (int argc, char **argv, options *opt);
/*
* Expected from the file defining the iterative method
*/
int iterative_method (point *p, options *opt);
int close_to_solution (point *p, options *opt);
void method_print (FILE *f, int s, int k, int max, options *opt);
#endif