xxxxxxxxxx
//This "setup" function is called once, at start
function setup() {
createCanvas(600, 600); // width and height, in pixels
noStroke();
background("lightblue");
}
let flowerX = 100;
let flowerY = 100;
const pallet = [
'#542344',
'#bfd1e5',
'#ebf5ee',
'#d8bfaa',
'#808080'
];
function flower(flowerX, flowerY) {
for (i = 200; i > 0; i -= 20) {
fill(random(pallet));
circle(flowerX, flowerY, i);
}
}
function draw() {
flower(flowerX, flowerY);
flowerX +=random(-50,50);
flowerY +=random(-50,100);
if (flowerY>500) {
flowerY -= 400;
flowerX += 100;
}
}
function mousePressed() {
redraw();
}