mecha-project01-face

sketch

function setup() {
    createCanvas(500,500);
    background(255);
    noStroke();
    fill(75,49,52);
    ellipse(250,255,450,450);

//hair
    noStroke();
    fill(150,106,70);
    rect(150,200,170,170);
//neck
    noStroke();
    fill(220,167,139);
    rect(225,350,52,30);

//shirt
    noStroke();
    fill(255);
    arc(250, 415, 140, 90, PI, 0, CHORD);

//neck
    fill(220,167,139);
    noStroke();
    arc(251, 370, 52, 30, 0, PI, CHORD);

//hair (bottom)
    fill(211,188,126);
    noStroke();
    triangle(130,230,120,370,200,370);
    triangle(370,230,300,370,380,370);
       
//face
    noStroke();
    fill(255,218,190);
    ellipse(250,230,240,270);

//shading
    noStroke();
    fill(220,167,139);

//eyes
    noStroke();
    fill(58,26,20);
    ellipse(214,260,15,15);
    noStroke();
    fill(58,26,20);
    ellipse(286,260,15,15);

//nose
    noStroke();
    fill(220,167,139);
    triangle(250,265,235,300,265,300);

//mouth
    stroke(58,26,20);
    strokeWeight(2.2);
    fill(255);
    ellipse(250,325,30,15);

//hair (top)
    fill(211,188,126);
    noStroke();
    arc(250,230,250,270,PI+.9, QUARTER_PI-0.8, OPEN);
    arc(250,230,250,270,PI+.2, QUARTER_PI-2.3, OPEN);

    arc(320,142,260,190,QUARTER_PI+.1, PI+0.07, OPEN);
    arc(139 ,130,140,150,QUARTER_PI-.7, PI-1.4, OPEN);

//eyebrows
    stroke(58,26,20);
    noFill();
    arc(300, 208, 60, 60, HALF_PI, PI-0.7);
    stroke(58,26,20);
    noFill();
    arc(210, 200, 60, 60, PI-2.1, PI-1.2);
}

function draw() {
}

In order to create this sketch, I decided to block out my face into basic shapes that I would be able to recreate with code. I began with a simple ellipse and moved on to create the expression and the hair. I used a lot of trial and error (especially for the arc objects) for the placement, sizes, and angles while trying to stick to a minimal color palette.

Leave a Reply