xxxxxxxxxx
// inspiration and starting point:
// https://editor.p5js.org/ri1/sketches/rVbun-rb2
let x = 0;
let circleSize = 500;
var counter = 0;
var palette = ["#406BB3", "#D2B75E", "#343434", "#9A6E3B", "#E0D4C6", "#466B3F", "#D69E91", "#C8C8CA"];
var fillOne,fillTwo;
function setup() {
size = min(windowWidth, windowHeight);
createCanvas(size, size);
x = size/2 - 100
}
function draw() {
background(0);
if (counter == 0){
circleSize = random(200,size);
fillOne = random(palette);
fillTwo = random(palette);
strokeOne = random(1,4);
strokeTwo = random(1,4);
}
for (let i = 0; i < 1000; i += 10) {
noFill()
stroke(fillOne);
strokeWeight(strokeOne)
ellipse(size/2, size/2, circleSize - i, circleSize+i)
stroke(fillTwo);
strokeWeight(strokeTwo)
ellipse(x, size/2, circleSize - i, circleSize+i)
}
if (x > width/2 + 100) {
x = size/2 - 100
} else {
x = x + 2
}
counter++;
}
// **************************
// * Save png *
// **************************
function keyTyped() {
if (key == "s" || key == "S") save("Title" + int(random(0, 1000)) + ".png");
}