-
Notifications
You must be signed in to change notification settings - Fork 1
/
mandelframe.h
31 lines (20 loc) · 867 Bytes
/
mandelframe.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
#pragma once
#include "zmatrix.h"
#include "console.h"
#include "consts.h"
// class handles ZMatrix object, maps ZMatrix array to dimensions of view, and carries out computations
class MandelFrame {
Console* console;
// dimensions of viewer window in complex plane terms - start with (-3, 1)x(2, -2), user can then zoom in
long double _x_left, _x_right, _y_top, _y_bottom;
// for mapping array elements into points on the complex plane
long double x_delta, y_delta, x_tick, y_tick;
public:
ZMatrix* z;
int iterations = MAX_ITERATIONS;
MandelFrame(long double x_left, long double x_right, long double y_top, long double y_bottom);
~MandelFrame();
void setDeltasAndTicks(long double x_left, long double x_right, long double y_top, long double y_bottom);
void setPlaneValues();
int mandelIterate(int index, int max_iterations, double max_abs);
};