xxxxxxxxxx
36
// inspired by Maeda's Morisawa:
// http://tdctokyo.org/eng/wp/wp-content/uploads/2010/08/375d64aec36b9acd72232efd01c79ee3.jpg
function setup() {
createCanvas(400, 500);
blendMode(DARKEST);
background(255);
}
function draw() {
background(255);
clear();
let harmonic = sin(frameCount/32) / 4;
let breeze = ( sin(frameCount/8) + 4 + harmonic) * width / 8;
silk(breeze);
}
function silk(breeze) {
for (let x = width / 8; x < width; x += width / 4) {
x_curve = x;
for (let y = -width/4; y < height+width/4; y++) {
let crescendo = map(y, 0, height, 0, 200);
stroke(0, (255 - crescendo) / 20); // circle
let radius = (4 - crescendo / 255) * width / 16;
ellipse(x_curve, y, radius, radius);
x_curve += (3 * y / height) * (breeze - x) / width;
}
}
}