-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTree.pde
More file actions
35 lines (29 loc) · 665 Bytes
/
Tree.pde
File metadata and controls
35 lines (29 loc) · 665 Bytes
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
int tree_diameter;
int tree_distance;
class Tree {
PVector pos;
Tag tag;
boolean tagged=false;
Tree (float xx, float yy, boolean tagged) {
pos = new PVector(xx,yy);
this.tagged=tagged;
if(tagged){
this.tag= new Tag(this);
}
}
void go () {
}
void tag() {
this.tagged=true;
this.tag = new Tag(this);
}
void draw () {
noStroke();
fill(20, 255, 90);
if(tagged) {
ellipse(pos.x, pos.y, tree_diameter*(0.7+2*tag.entropy), tree_diameter*(0.7+2*tag.entropy));
this.tag.draw();
}
else ellipse(pos.x, pos.y, tree_diameter, tree_diameter);
}
}