ChristineSeo-Project05-SectionC

sketch

// Christine Seo
// Section C
// mseo1@andrew.cmu.edu
// Project-05

var shapeSize;
var smallSize;

var r;

function setup() {
  createCanvas(500, 500);
  
   mouseClicked();
}

function mouseClicked(){
   background(255, 250, 220);

//first row set
push();
for(var x = 15; x <= width; x += 110){
  for(y = 30; y <= height; y += 110){
	shapeSize = random(15,25); //randomness of size of shapes with restriction
	smallSize = random(5,7);//randomness of size of shapes with smaller restriction
  
  r = random(255)
  
  noStroke();
	colorMode(HSB,200);//restrict colors
	var c = color(r,30,200);
	fill(c);
  ellipse(x + 5,y - 13,smallSize,shapeSize);//ears
  rect(x,y,shapeSize,shapeSize); //;legs
  ellipse(x,y,shapeSize,shapeSize);//eye
  ellipse(x + 25,y,shapeSize + 12,shapeSize + 12);//body
  fill(50);
  ellipse(x,y,shapeSize / 2,shapeSize / 2);//eye black
  fill(255);
  ellipse(x + 5,y - 3,shapeSize / 3,shapeSize / 3);//eye highlight
  	}
	}
pop();

//hearts pattern
push();
for(var x = 70; x <= width; x += 110){
  for(y = 80; y <= height; y += 115){
  r = random(255)

  noStroke();
  colorMode(HSB,200);
  var c = color(r,30,200);
  fill(c);
  triangle(x,y,x + 20,y + 20,x + 40,y);//bottom of heart
  triangle(x + 15,y,x + 30,y - 10,x + 40,y);//top right of heart
  triangle(x,y,x + 15,y - 10,x + 25,y);//top left of heart
    }
  }
pop();

noLoop() 
}

Ideas: Rough sketch

I was inspired by my baby cousin’s bunny wallpaper. I added hearts to give it a different pattern so it won’t be boring. I wanted to randomize the color and size of the shape of the bunny as well. I tried to stay in certain a color palette that resonates with soft colorful cotton candies. I also made sure the pattern visually stayed within the canvas. This project is something that I would actually use in real life and even in other classes if I need a unique background for other projects! I think the for loop function is very useful to redraw multiple things at once.

 

Leave a Reply