-
Notifications
You must be signed in to change notification settings - Fork 0
/
imageDraw.pde
39 lines (34 loc) · 1.04 KB
/
imageDraw.pde
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
void imageDraw(){
for (int i=0; i<tabImage.size(); i++) {
PTImage p =tabImage.get(i);
float imagex =map((p.gpsLat), m.xMin, m.xMax, m.x, m.w);
float imagey =map((p.gpsLong), m.yMin, m.yMax, m.y, m.h);
//float car = map(p.cardio, 100, 180, 5, 240);
//float car2 = map(p.cardio, 80, 100, 30, 3);
fill(0, 255, 0, 100);
noStroke();
ellipse(
map((p.gpsLat), m.xMin, m.xMax, m.x, m.w),
map((p.gpsLong), m.yMin, m.yMax, m.y, m.h),
10, 10);
/*
tint(255,100);
image(p.ima,
map((p.gpsLat), m.xMin, m.xMax, m.x, m.w),
map((p.gpsLong), m.yMin, m.yMax, m.y, m.h),
p.ima.width/10, p.ima.height/10);
*/
if (dist(x, y, imagex, imagey)<255) {
float val = map(constrain(dist(x, y, imagex, imagey), 0, 255),0,255,255,0);
stroke(255, val);
line(x, y, imagex, imagey);
tint(255, val);
pushMatrix();
translate(height/2,height/2);
rotate(PI/2);
imageMode(CENTER);
image(p.ima, 0, 0, height,height-10);
popMatrix();
}
}
}