Project 1: Self Portrait
// at least 10 graphic elements -> quad, triangle, ellipse,
//square, arc, line, point
function setup()
{
createCanvas(200, 200);
background(255, 0, 0);
}
function draw()
{
strokeWeight (0);
//lines in background
strokeWeight (10);
stroke (255, 255, 255); // white lines
line (0, 200, 200, 0);
line (30, 200, 200, 30);
stroke (0, 0, 0); //black lines
line (0, 0, 200, 200);
line (30, 0, 200, 170);
line (0, 150, 50, 200);
line (0, 120, 80, 200);
strokeWeight(0);
//earrings
fill (0, 255, 255);
triangle (45, 170, 65, 170, 55, 140);
triangle (155, 170, 135, 170, 145, 140);
fill (255, 255, 0);
circle (55, 140, 7);
circle (145, 140, 7);
//head
fill (185, 255, 218);
ellipse(100, 100, 100, 120);
ellipse (100, 200, 200, 40);
fill (0, 0, 102);
arc (100, 100, 100, 120, PI + HALF_PI, HALF_PI, CHORD);
arc (100, 200, 200, 40, PI, PI + HALF_PI);
circle (80, 85, 15);
fill (185, 255, 218);
circle (120, 85, 15);
fill (255, 255, 255);
ellipse (100, 130, 50, 15);
fill (210, 0, 0);
circle (65, 110, 18);
circle (135, 110, 18);
//hat
fill (0, 0, 102);
rect (55, 30, 90, 20);
rect (75, 5, 50, 40);
fill (185, 255, 218);
rect (100, 30, 45, 20);
rect (100, 5, 25, 40);
noLoop ();
}