Kevin Riordan Project-01

kzr-project01

/*Kevin Riordan
Section C
kzr@andrew.cmu.edu
project_01*/
function setup() {
    createCanvas(500, 525);
    background(50,50,50);
}

function draw() {
    //ears
    fill(183,128,100);
    arc(395,260,40,80,PI+HALF_PI,HALF_PI,PIE);
    arc(105,260,40,80,HALF_PI,PI+HALF_PI,PIE);
    //face
    fill(219,182,156);
    strokeWeight(1);
    quad(100,150,400,150,390,430,110,430);
    //neck and body
    rect(200,430,100,95);
    stroke(0);
    line(200,430,300,430);
    //hair
    fill(79,48,35);
    noStroke();
    quad(100,150, 250,90,440,78,420,150);
    triangle(100,150,420,150,100,170);
    stroke(0);
    //nose
    noStroke();
    fill(183,128,100);
    triangle(250,240,275,320,225,320);
    arc(250,320,60,50,PI,2*PI,PIE);
    //mouth
    stroke(0);
    strokeWeight(1);
    fill(255);
    arc(250, 350, 160, 80, 0, PI, PIE);
    line(170,350,330,350);
    //eyebrows
    stroke(79,48,35);
    strokeWeight(3);
    line(150,200,200,205);
    line(300,205,350,200);
    //eyes
    stroke(0);
    strokeWeight(2);
    ellipse(175,230,50,20);
    ellipse(325,230,50,20);
    noStroke();
    fill(0);
    ellipse(175,230,20,20);
    ellipse(325,230,20,20);
}

I have never written code before, so this was pretty hard for me, but by the time I finished I felt much more comfortable with how to add shapes, and what order to write stuff in.

One thought on “Kevin Riordan Project-01”

Leave a Reply