-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathDiscretePlot.h
62 lines (57 loc) · 1.21 KB
/
DiscretePlot.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
50
51
52
53
54
55
56
57
58
59
60
61
62
#pragma once
#include "GraphicsMaker2D.h"
#include "F1P.h"
namespace nV {
namespace Graphics {
#define FILL_NULL 0
#define FILL_AXIS_DISCRETE 2
#define FILL_CURVE 1
#define MAX_DERIVATIVE 20
#define MIN_STEP 0.00000001
#define MIN_DISTANCE 1
#define MAX_YRANGE 20
#define MAX_GRAPHSCALE 3
#define MIN_GRAPHSCALE 0.1
#define MAX_DELETE_AMOUNT 5
class DiscretePlot : public GraphicsMaker2D {
private:
/*typedef struct
{
double min;
double max;
}x_domain;*/
uint curnum;
uint maxpnum;
uint *pnum;//the number of point in each line
bool* singular_flag;//ÿÌõÏßÊÇ·ñΪÆæµãº¯Êý
int filling;
int fillcur1,fillcur2;
double XMin,XMax;
double XStep;
int colorFunctionSet;
bool joined;
F1P *cf;
var varplist;
//expression
var expression;
ArrayList<Color*> color;
//std::vector<x_domain *> x_domain;
var xparam;
//kernel
Kernel &k;
public:
DiscretePlot(Kernel& k, const Tuple& cmd);
~DiscretePlot();
var exportGraphics();
private:
void makePointList();
void makeColorOption();
void makeyrange();
int getNoNaNsum();
int getNoNaN_fillCurve();
int getDomainNumber();
protected:
void setRule(var title, var rule);
};
}
}