xxxxxxxxxx
102
//------NAME: Seyoung Lee
//------One with Everything
function setup() {
createCanvas(400, 400);
}
function draw() {
background(228,218,204,255);
//------Rectangle----
noStroke();
fill(234,209,193,255);
rect(25,25,350, 350);
//------Line Segment-----
strokeWeight(8);
stroke(17,54,51,200);
line(100,0, 150, 50);
line(150,50,100,100);
line(100,100,150,150);
line(150,150,100,200);
//------Rounded Rect----
noStroke();
fill(181,110,82,255);
rect(-25, 300, 200, 60, 100);
//------Ellipse-------
noStroke();
fill(212,160,50,180);
ellipse(350,200,200, 450);
//------Filled Arc----
noStroke();
fill(181,110,82,200);
arc(150, 240, 160, 160, 0, PI + QUARTER_PI, CHORD);
//------Point-------
stroke(0,0,0,255);
strokeWeight(10);
point(250, 100);
point(300, 100);
point(350, 100);
point(250, 150);
point(300, 150);
point(350, 150);
m = 200
p = 250
c = 300
point(350, m);
point(250, m);
point(300, m);
point(350, m);
point(350, p);
point(250, p);
point(300, p);
point(350, p);
point(350, c);
point(250, c);
point(300, c);
point(350, c);
//------Triangle-----
noStroke();
fill(17,54,51,100);
triangle(80,100,80,230,300,110);
//------Bezier curve----
noFill();
strokeWeight(5);
stroke(212,160,50,255);
bezier(85, 20, 10, 10, 90, 90, 15, 80);
//------Polyline----
noFill();
stroke(181,110,82,255);
beginShape();
vertex(150,200);
vertex(260,200);
vertex(260, 250);
vertex(100, 250);
endShape();
//------Polygon----
strokeWeight(3);
stroke(17,54,51,255);
beginShape(TRIANGLE_FAN);
vertex(57.5, 50);
vertex(57.5, 15);
vertex(92, 50);
vertex(57.5, 85);
vertex(22, 50);
vertex(57.5, 15);
translate (180, 280);
endShape();
}