float sw, alpha;
float yStep = 10;
float arcSize = 200;
float sw, alpha;
float yStep = 10;
float arcSize = 200;
void setup() {
size(1280, 720);
}
void draw() {
background(#E0DEDE);
mouseX = constrain(mouseX, 10, width);
mouseY = constrain(mouseY, 10, height);
//yStep = mouseY;
//arcSize = mouseX;
noFill();
stroke(20);
strokeWeight(5);
for (int y=0; y<height; y+=yStep) {
for (int x=0; x<width+arcSize; x+= arcSize) {
sw = map(sin(radians(y+alpha)), -1, 1, 2, yStep);
strokeWeight (sw);
//(you can change PI HERE)float arcL = map(mouseX, 0, width, 0, TWO_PI );
arc(x, y, arcSize/2, arcSize/2, 0, PI);
arc(x+arcSize/2, y, arcSize/2, arcSize/2, PI, TWO_PI);
}
}
alpha++;
}
0 comments:
Post a Comment