Project 1 – Self Portrait

portrait
function setup() {
    createCanvas(600, 600);
    background(220);
    text("p5.js vers 0.9.0 test.", 10, 15);
}

function draw() {
    background(0, 200, 200);
    fill(70, 40, 20);
    rect(220, 290, 160, 150);
    fill(70, 40, 20);
    ellipse(300, 290, 160, 190);      //hair
    fill(230, 190, 190);
    circle(230, 310, 30);             //left ear
    fill(230, 190, 190);
    circle(370, 310, 30);             //right ear
    fill(230, 190, 190);
    ellipse(300, 300, 150, 180);      //face
    fill(255);
    circle(275, 275, 30);
    fill(0);
    circle(280, 270, 10);             //left eye
    line(267, 255, 277, 253);         //left eyebrow
    fill(255);
    circle(325, 275, 30);
    fill(0);
    circle(330, 270, 10);             //right eye
    line(323, 253, 333, 255);         //right eyebrow
    fill(0);
    circle(300, 310, 3);              //nose
    noFill();
    arc(300, 330, 50, 50, 270, 90);
    line(320, 323, 330, 326);         //mouth
}

Leave a Reply