Project-01-Face

sketch

//Natalie Schmidt
//Section D
//nkschmid@andrew.cmu.edu
//Project-01

function setup() { //background
    createCanvas(500, 500);
    background(256);
    angleMode(DEGREES);
}

function draw() {
//background design
    noStroke(0);
    fill(255, 186, 22);
    triangle(0, 0, width/2, 0, 0, height/2);
    fill(232, 17, 77);
    triangle(500, 0, width/2, 0, 500, height/2);
    fill(20, 179, 177);
    triangle(0, 500, 250, 500, 0, 250);
    fill(255, 132, 0);
    triangle(500, 500, 500, 250, 250, 500);
    fill(0);
  //hair
    fill(126, 45, 0);
    noStroke();
    ellipse(250, 285, 250 , 300);
//head shape
    fill(239, 189, 118);
    ellipse(250, 250, 200, 200);
//eyes
    fill(0);
    ellipse(220, 240, 25, 25);
    fill(0);
    ellipse(width-220, 240, 25, 25);
//eyelashes
    stroke(0);
    noFill();
    curve(185, 0, 205, 215, 220, 215, 220, 0);
    curve(width-185, 0, width-205, 215, width-220, 215, width-220, 0);
//nose
    fill(0);
    stroke(0);
    line(250, 235, 250, 260);
    stroke(0);
    line(250, 260, 265, 275);
    stroke(0);
    line(265, 275, 250, 280);
//freckles
    fill(167, 121, 55);
    noStroke();
    ellipse(200, 275, 3, 3);
    ellipse(180, 280, 3, 3);
    ellipse(170, 260, 3, 3);
    ellipse(190, 260, 3, 3);
    ellipse(215, 265, 3, 3);
    ellipse(230, 275, 3, 3);
    ellipse(width-200, 275, 3, 3);
    ellipse(width-180, 280, 3, 3);
    ellipse(width-170, 260, 3, 3);
    ellipse(width-190, 260, 3, 3);
    ellipse(width-215, 265, 3, 3);
    ellipse(width-225, 275, 3 ,3);
//mouth
    stroke(0);
    noFill();
    curve(210, 0, 210, 285, width-210, 285, 310, 0);
//bangs
    fill(126, 45, 0);
    noStroke();
    translate(495, 210);
    rotate(145);
    ellipse(220, 180, 150, 60);
}

While creating this project, I really just wanted to jump in head-first and try all kinds of different functions; however, having never coded before, this proved to be pretty difficult. I got the hang of ellipses, rectangles, color, etc., but I realized that many of the things I wanted to do were too advanced to attempt for now. Despite that, I’m very proud of what I created, seeing as how I had never done anything like this before. It was fun and incredibly satisfying to actually edit and type code and see that reflected on the image itself. I’m looking forward to learning more advanced material and learning how to incorporate more detail into future projects.

Leave a Reply