-
Notifications
You must be signed in to change notification settings - Fork 0
/
working_sketch.pde
54 lines (38 loc) · 987 Bytes
/
working_sketch.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//int dim = 1000;
int shapeWidth = 100;
int xPos = 0;
int yPos = 0;
void setup() {
size(1000, 1000);
colorMode(HSB);
//blendMode(MULTIPLY);
//frameRate(5);
}
void draw() {
xPos += random(-50, 50);
yPos += random(-20, 20);
rect(xPos, yPos, shapeWidth, shapeWidth);
//xPos = xPos + shapeWidth;
xPos += shapeWidth;
//if(xPos >= width-shapeWidth) {
if(xPos >= width) {
float myHue = map(yPos, 0,1000, 0, 255);
println(myHue);
fill(myHue, 255,255, 10);
yPos += shapeWidth;
xPos = 0;
}
if(yPos >= height) {
yPos = 0;
}
/*fill(20,255,255,10);
rect(0,0,shapeWidth,shapeWidth);
fill(60,255,255,10);
ellipseMode(CORNER);
ellipse(0,200,shapeWidth,shapeWidth);*/
/*float currentShapeWidth = map(mouseX, 0, width, 50, 200);
float currentHue = map(mouseY, 0, height, 0, 255);
fill(currentHue,255,255,10);
noStroke();
ellipse(mouseX,mouseY,currentShapeWidth,currentShapeWidth);*/
}