xxxxxxxxxx
// #WCCChallenge, Textile theme
// based on idea of an old, faded rug w/ unidentified circle stains ~ mystery!
// https://twitter.com/metanivek
// https://www.instagram.com/metanivek/
function setup() {
createCanvas(270, 270 * (5 / 4));
colorMode(HSB, 360, 100, 100);
}
function draw() {
noLoop();
clear();
background(0, 0, 98);
for (var i = 0; i < 10; i++) {
// texture
blendMode(MULTIPLY);
const s = int(random(3, 10));
for (var x = 0; x < width; x += s) {
for (var y = 0; y < height; y += s) {
const n = noise(x * 0.002, y * 0.002);
fill(color(random(30, 40), 70, 90, 0.2));
noStroke();
ellipse(n + x, n + y, s / random(1, 3), s * 2);
}
if (x % s === 0) {
strokeWeight(0.5);
stroke(color(0, 0, 98, 0.1));
line(x, 0, x, height);
}
}
// stain
blendMode(OVERLAY);
for (var k = 0; k < 2; k++) {
const x = random(k * s, width);
const y = random(k * s, height);
const r = random(width * 0.15, width * 0.3);
noFill();
stroke(color(0, 0, 5, 0.2));
strokeWeight(int(random(r * 0.1, r * 0.2)));
ellipse(x, y, r, r);
}
}
}
function mousePre55ed() {
loop();
}
// proce55ing :D
mousePressed = mousePre55ed;