xxxxxxxxxx
25
yStep = 10;
valpha = 0;
arcSize =200
function setup() {
createCanvas(600, 600);
}
function draw() {
background('white');
mouseX = constrain(mouseX, 10, width);
mouseY = constrain(mouseY, 10, height);
yStep = mouseY;
arcSize = mouseX;
noFill();
for (y=0; y<height; y+=yStep) {
sw = map(sin(radians(y + valpha)), -1, 1, 2, yStep);
strokeWeight(sw);
for (x=0; x<width+arcSize; x+=arcSize) {
arc(x, y, arcSize / 2, arcSize / 2, 0, PI);
arc(x + arcSize / 2, y, arcSize / 2, arcSize / 2, PI, TWO_PI);
}
}
valpha++;
}