xxxxxxxxxx
50
//Katie Liu
//IML 300
//This creates a different pattern of flowers at every mouse click! It gives me Betsy Johnson vibes. The pattern of flowers changes as well as the background color and color of the flower in the middle! The background color maintains in the green-blue hues as the flower middle remains in the red-yellow hues.
function setup() {
createCanvas(800, 800);
noStroke();
background(random(225), 225, random(225));
for (var i=0; i<=300; i++){
let x=random(width);
let y=random(height);
// for (var x=50; x <= width; x += 50 ){
// for(var y=50; y<=height; y +=50){
fill(random(255), random(255), random(255));
ellipse(x,y,20,20)
ellipse(x-15,y+5,20,20)
ellipse(x-25,y-5,20,20)
ellipse(x-17,y-20,20,20)
ellipse(x,y-15,20,20)
// fill(255, 230, 51);
fill (225, random(225), random(225));
ellipse(x-12,y-7,22,22)
}
}
function draw() {
}
function mouseClicked(){
// background(0, 200, random(225));
background(random(225), 225, random(225));
for (var i=0; i<=300; i++){
let x=random(width);
let y=random(height);
// for (var x=50; x <= width; x += 50 ){
// for(var y=50; y<=height; y +=50){
fill(random(255), random(255), random(255));
ellipse(x,y,20,20)
ellipse(x-15,y+5,20,20)
ellipse(x-25,y-5,20,20)
ellipse(x-17,y-20,20,20)
ellipse(x,y-15,20,20)
// fill(255, 230, 51);
fill (225, random(225), random(225));
ellipse(x-12,y-7,22,22)
}
}