-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGraph.pde
More file actions
68 lines (59 loc) · 1.32 KB
/
Graph.pde
File metadata and controls
68 lines (59 loc) · 1.32 KB
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
63
64
65
66
67
68
//EXTERIOR
//ellipse(400, 50, 10, 10);
//ellipse(615, 175, 10, 10);
//ellipse(615, 424, 10, 10);
//ellipse(400, 550, 10, 10);
//ellipse(185, 425, 10, 10);
//ellipse(185, 175, 10, 10);
class Graph {
//Global class variables
int x, y;
float level;
float randomLevel;
float px, py;
color col;
//Constructor - setup variables
Graph (int tempX, int tempY, float tempLevel, color c) {
x = tempX;
y = tempY;
level = tempLevel;
randomLevel = random(0.1, 1.);
col = c;
}
void setXpos() {
}
void setYpos() {
}
void setLevel(float tempLevel) {
float mapLevel = map(tempLevel, 0, 11., 0.1, 1.);
level = mapLevel;
//level = tempLevel;
}
float getXpos() {
float xPosition;
xPosition = px;
return xPosition;
}
float getYpos() {
float yPosition;
yPosition = py;
return yPosition;
}
float getLevel() {
float pointLevel;
pointLevel = level;
return pointLevel;
}
void draw() {
stroke(0, 180, 236, 100);
//float progress = map(mouseX, 0, width, 0, 1);
stroke(0, 180, 236, 50);
//curve(width/2, height/2, width/2, height/2, x, y, x, y);
px = curvePoint(width/2, width/2, x, x, level);
py = curvePoint(height/2, height/2, y, y, level);
fill(col);
stroke(255);
strokeWeight(3);
ellipse (px, py, 15, 15);
}
}