xxxxxxxxxx
118
//Xinyue Elena Peng
//Code 1
//Still Life
function setup() {
createCanvas(400, 400);
}
function draw() {
background(191, 223, 220);
strokeWeight(0);
//fill
square(50, 80, 250);
fill(255, 260, 220);
circle(250, 280, 200);
fill(210, 188, 255);
circle(140, 340, 150);
//A cup
fill(120, 171, 137);
ellipse(140, 220, 130, 100);
noFill();
stroke(250);
strokeWeight(14);
ellipse(140, 220, 130, 100);
fill(250);
noStroke();
rect(130, 150, 80, 170);
triangle(130 + 122, 150, 130 + 80, 320, 100 + 80, 150);
triangle(130, 150, 130, 320, 98, 150);
ellipse(170, 315, 80, 60);
stroke(120, 171, 137);
strokeWeight(3);
arc(170, 278, 98, 60, 0, PI);
arc(172, 220, 125, 60, 0, PI);
//handle
fill(120, 171, 137);
ellipse(175, 150, 150, 70);
stroke(250);
strokeWeight(5);
ellipse(175, 150, 150, 70);
fill(140, 160, 110);
ellipse(175, 165, 125, 50);
//green leaf
noStroke();
fill(160, 193, 160);
square(280, 300, 10);
square(270, 310, 10);
//flowers background
fill(255, 239, 152);
ellipse(280, 300, 10, 20);
ellipse(290, 310, 20, 10);
ellipse(270, 310, 20, 10);
ellipse(280, 320, 10, 20);
fill(245, 153, 153);
circle(280, 310, 6);
//flower repeats
//green leaf
fill(160, 193, 160);
square(280 - 90, 300 - 50, 10);
square(270 - 90, 310 - 50, 10);
//flowers background
fill(255, 239, 152);
ellipse(280 - 90, 300 - 50, 10, 20);
ellipse(290 - 90, 310 - 50, 20, 10);
ellipse(270 - 90, 310 - 50, 20, 10);
ellipse(280 - 90, 320 - 50, 10, 20);
fill(245, 153, 153);
circle(280 - 90, 310 - 50, 6);
//bottle starts here
fill(212, 117, 34);
noStroke();
//orange rect
rect(200, 250, 70, 100);
fill(0);
//neck
rect(215, 240, 40, 10);
//top
rect(200, 210, 70, 30);
//perfume
fill(243, 164, 95);
arc(235, 325, 60, 30, 0, PI);
rect(205, 255, 60, 70);
//tag
fill(250);
rect(210, 260, 50, 30);
//text
fill(0);
textSize(7);
text('intoxicating', 218, 285);
textSize(12);
text('NOME ', 217, 275);
//nail polish
fill(255, 196);
rect(165 - 40, 300, 55, 65);
fill(242, 201, 66);
rect(170 - 40, 305, 45, 55);
fill(250);
textSize(9);
text('nailpolish', 173 - 40, 350);
textSize(14);
text('sun', 180 - 40, 335);
fill(242, 201, 66);
rect(182 - 40, 260, 20, 50);
stroke(250);
strokeWeight(2);
ellipse(152, 262, 22, 13);
}