xxxxxxxxxx
88
function setup() {
createCanvas(600, 600);
background(224);
}
/*
For colors, search "RGB color picker" in Google
P5JS Drawing Functions:
noStroke(); // remove outline
fill(R, G, B); // set fill color
stroke(R, G, B); // set outline color
strokeWeight(#); // set outline thickness
rect(x, y, w, h); // draw a rectangle
ellipse(x, y, w, h); // draw an ellipse
triangle(x1, y1, x2, y2, x3, y3); // draw a triangle
line(x1, y1, x2, y2); // draw a line
*/
function draw() {
// face
fill(140, 140, 140);
ellipse(300, 300, 500, 500);
// Left Eye - Jennie C.
fill('white');
ellipse(200, 262, 95, 100 );
fill('black');
ellipse(200, 275, 75, 75 );
fill('white');
ellipse(220, 295, 10, 10 );
ellipse(200, 265, 25, 25 );
fill('black');
triangle(190, 190, 270, 230, 190, 220);
triangle(190, 190, 140, 230, 190, 220);
// Right Eye - Mariana
// hair - Laurie
// nose - Kristy
// mouth - Krissie
stroke('red');
strokeWeight(2)
fill ('salmon')
quad(150,400, 450,400, 310,450, 300,450)
triangle(150,400,300,400, 250,350)
triangle(300,400, 350,350, 450, 400)// mouth
stroke('red');
strokeWeight(2)
fill ('salmon')
quad(150,400, 450,400, 310,450, 300,450)
triangle(150,400,300,400, 250,350)
triangle(300,400, 350,350, 450, 400)// mouth
// etc? - Jennie M.
noStroke()
fill(121, 100, 135)
rect(175, 500, 250, 250)
fill(94, 71, 110)
rect(185, 500, 10, 250)
rect(205, 500, 10, 250)
rect(225, 500, 10, 250)
rect(245, 500, 10, 250)
rect(265, 500, 10, 250)
rect(285, 500, 10, 250)
rect(305, 500, 10, 250)
rect(325, 500, 10, 250)
rect(345, 500, 10, 250)
rect(365, 500, 10, 250)
rect(385, 500, 10, 250)
rect(405, 500, 10, 250)
fill(224);
ellipse(150, 550, 100, 100)
ellipse(450, 550, 100, 100)
fill(140, 140, 140);
ellipse(300, 300, 500, 500);
// moles/freckles - Laura
}