Hannah K-Project-01

sketch-59.js

function setup() {
    createCanvas(400, 400);
    background(255,181,197);

}

function draw() {

    // Top part of hair - Arc
    fill(51,25,0);
    arc(200,125,200,200,PI,TWO_PI);

    // Main part of hair - Rectangle
    fill(51,25,0);
    rect(100,125,200,158);

    // Face - Ellipse
    fill(225,220,178);
    ellipse(200,155,150,185);

    // Nose - Triangle
    fill(225,200,100);
    triangle(190,170,210,170,200,150);

    // Top of body - Triangle
    noStroke();
    fill(0,205,205);
    triangle(150,416,198,282,246,416);

    // Eye 1 - Circle
    fill(0,0,0);
    ellipse(165,125,25,25);

    // Pupil 1 - Circle
    fill(255,255,255);
    ellipse(165,130,8,8);

    // Eye 2 - Circle
    fill(0,0,0);
    ellipse(235,125,25,25);

    // Pupil 2 - Circle
    fill(255,255,255);
    ellipse(235,130,8,8);

    // Mouth - Arc
    fill(255,250,205);
    arc(200,190,80,80,0,PI);

    // Eyebrow 1 - Rectangle
    fill(51,25,0);
    rect(155,100,18,4);

    // Eyebrow 2 - Rectangle
    fill(51,25,0);
    rect(225,100,18,4);

}

As many people have mentioned, one of the most difficult and time consuming parts of this process was figuring out the coordinates. While I did attempt to take notes as I created my portrait, ultimately, I did a lot of guessing and checking. Overall, I enjoyed the process and look forward to becoming better at coding more efficiently. This was one of the first times I’ve ever used code to create something remotely artistic, so this was really exciting!

Leave a Reply