xxxxxxxxxx
224
/*Self portrait v1
by Alina Perdomo
9/19/22 */
function setup() {
createCanvas(400, 600);
background ('#6DC7B4')
//background
noStroke();
//1st row
fill('#EF4153');
circle(50,75,150);
fill('#645DA9');
circle(50+150,75,150);
fill('#F47729');
circle(50+300,75,150);
//2nd row
fill('#F6B0CF');
circle(50,75+150,150);
fill('#6DC7B4');
circle(50+150,75+150,150);
fill('#EF4153');
circle(50+300,75+150,150);
//3rd row
fill('#F47729');
circle(50,75+300,150);
fill('#6DC7B4');
circle(50+150,75+300,150);
fill('#645DA9');
circle(50+300,75+300,150);
//4th row
fill('#EF4153');
circle(50,75+450,150);
fill('#6DC7B4');
circle(50+150,75+450,150);
fill('#F6B0CF');
circle(50+300,75+450,150);
//hair (back)
//right
stroke('#34251D');
fill('#34251D');
circle (200,205,200);
circle (200+70,210,150);
circle (200+100,270,170);
circle (200+110,330,160);
circle (200+130,380,130);
circle (200+120,450,130);
circle (200+80,460,130);
//left
circle (200-70,210,150);
circle (200-100,270,170);
circle (200-110,330,160);
circle (200-130,380,130);
circle (200-120,450,130);
circle (200-80,460,130);
//neck
noStroke();
rectMode(CENTER);
fill('#FCD1BB');
rect(200,470,80,100);
//headshadow
fill('#CCA28B');
arc(200,420,80,40,0,PI);
//earrings
//left
noFill();
strokeWeight(3);
stroke('#DBA514');
ellipse(200-100,345,30,60);
//right
noFill();
stroke('#DBA514');
ellipse(200+100,345,30,60);
//head
noStroke();
fill('#FCD1BB');
ellipse(200, 280, 235, 310);
//body
fill('#000000');
rect (200,640,370,300,100);
//vneck
fill('#FCD1BB');
beginShape();
vertex(200-40, 490);
vertex(200+40, 490);
vertex(200, 610);
endShape(CLOSE);
//necklace
stroke('#DBA514');
strokeWeight(5);
bezier(200-39, 490, 200, 510, 200, 510, 200+39, 490);
//nose
fill ('#F4C1A6');
stroke('#CCA28B');
strokeWeight(0.5);
circle (200-11,310+22,17);
circle (200+11,310+22,17);
noStroke();
rect(200,310,23,50);
circle (200,310+25,20);
//lips
//top
fill('#EA9292');
circle (200-6,375,15);
circle (200+6,375,15);
triangle(200+8, 375+7, 200+8, 360+7, 230+8, 375+7);
triangle(200-8, 375+7, 200-8, 360+7, 200-38, 375+7);
//bottom
fill('#CA5D5D');
noStroke();
arc(200,380,70,28,0,PI);
//hair bangs (right)
fill('#34251D');
strokeWeight(20);
stroke('#34251D');
beginShape();
vertex(200, 150);
bezierVertex(210, 180, 220, 185, 240, 180);
bezierVertex(240, 180, 260, 180, 260, 200);
bezierVertex(260, 200, 250, 230, 290, 230);
bezierVertex(290, 230, 310, 230, 310, 260);
bezierVertex(310, 270, 300, 300, 340, 290);
bezierVertex(340, 200, 250, 100, 200, 120);
endShape(CLOSE);
//hair bangs (left)
beginShape();
vertex(220, 150);
bezierVertex(210-20, 180, 220-40, 185, 240-80, 180);
bezierVertex(240-80, 180, 260-120, 180, 260-120, 200);
bezierVertex(260-120, 200, 250-100, 230, 290-180, 230);
bezierVertex(290-180, 230, 310-220, 230, 310-220, 260);
bezierVertex(310-220, 270, 300-200, 300, 340-290, 290);
bezierVertex(340-280, 200, 250-100, 100, 200, 120);
endShape(CLOSE);
//brows
fill('#26180F');
rectMode(CORNER);
strokeWeight(2);
//right
beginShape();
vertex(220, 257);
vertex(220, 267);
vertex(260,260);
vertex(280,265);
vertex(260,253);
endShape(CLOSE);
//left
beginShape();
vertex(220-40, 257);
vertex(220-40, 267);
vertex(260-120,260);
vertex(280-160,265);
vertex(260-120,253);
endShape(CLOSE);
/*
//grid
strokeWeight (1);
stroke('red');
line(200,0,200,700);
//grid (for brows)
//horizontal
line(0,260,400,260);
//vertical
line(200+20,0,200+20,700);
line(200-20,0,200-20,700);
*/
// save('selfportrait_v1.png');
}