interference disc
@author
function setup() {
createCanvas(windowWidth, windowHeight);
mousePressed();
}
function mousePressed() {
blendMode(BLEND);
background(random(255), random(255), random(255));
blendMode(DIFFERENCE);
translate(width / 2, height / 2);
push();
for (var i = 0; i < 5; i++) {
drawCircles();
}
pop();
}
function draw() {
}
function drawCircles() {
translate(randomGaussian(0, 4), randomGaussian(0, 4));
stroke(random(255), random(255), random(255));
strokeWeight(5);
noFill();
for (var r = 10; r < windowWidth + windowHeight; r += 20) {
ellipse(0, 0, r, r);
}
}