-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscripture.java
More file actions
38 lines (31 loc) · 857 Bytes
/
scripture.java
File metadata and controls
38 lines (31 loc) · 857 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
36
37
38
PImage pic;
void setup(){
size(1000, 1000);
pic = loadImage("C:\\Users\\ily\\Desktop\\gal.jpg");
// pic = loadImage("gal.jpg");
}
void draw() {
background(0);
int mountX = 300;
int mountY = 300;
pic.resize(mountX, mountY);
float w = (float) width / mountX;
float h = (float) width / mountY;
for(int i = 0; i < mountX; i++) {
for(int j = 0; j < mountY; j++) {
color c = pic.get(i, j);
float bri = brightness(c);
push();
translate(i * w, j * h);
if (bri > 80) {
float conf = map(bri,
0, 255,
0, 1);
fill(255);
ellipseMode(CORNER);
ellipse(0, 0, w * conf, h);
}
pop();
}
}
}