Project 1: Self-Portrait.

I did this before we went over “width/2” and “height/2”, so trying to guess and predict individual points was very tedious and difficult!

my-portrait
function setup() {
    createCanvas(300, 300);
    background(180);
    text("p5.js vers 0.9.0 test.", 10, 15);
}

function draw() {
    background('#F2857D');
    fill('#ED5145');
    noStroke();
    circle(width/2,height/2,190);
    noFill();
    stroke('#FDE74C');
    strokeWeight(15);
    circle(width/2, height/2,250);
    fill('#D4A25B');
    stroke('#D4A25B');
    strokeWeight(1);
    quad(172,225,129,225,123,130,178,130);

    fill('#163905');
    stroke('#163905');
    quad(172,220,129,220,50,250,250,250);
    rect(48,251,204,100);

    fill('#33830B');
    stroke('#33830B');
    quad(173,210,150,220,155,230,184,224);
    quad(127,210,150,220,145,230,116,224);

    fill('#F1C280');
    stroke('#F1C280');
    ellipse(150,129,87,84);
    quad(167,195,134,195,111,148,189,148);

    fill('#C28146');
    circle(150,147,20);

    fill('#CB6618');
    stroke('#CB6618');
    triangle(148,172,145,166,138,172);
    triangle(152,172,155,166,162,172);
    circle(150,168,10);

    fill('#F1C280');
    stroke('#F1C280');
    circle(150,135,35);
    ellipse(150,164,8);

    fill('#C28146');
    stroke('#C28146');
    quad(145,180,143,177,157,177,155,180);
    ellipse(150,180,10,6);

    fill('#FDF6ED');
    stroke('#FDF6ED');
    ellipse(133,142,23,8);
    ellipse(167,142,23,8);
    quad(145,142,121,142,119,132,146,132);
    quad(179,142,155,142,154,132,181,132);

    fill(40);
    stroke(40);
    ellipse(132,131,28,4);
    ellipse(168,131,28,4);

    fill('#FDF6ED');
    stroke('#FDF6ED');
    ellipse(132,134,25,4);
    ellipse(168,134,25,4);

    fill(40);
    stroke(40);
    quad(97,83,188,89,190,110,105,110);
    rect(104,107,8,35);
    rect(186,107,8,35);
    triangle(105,143,112,143,113,153);
    triangle(186,143,194,143,188,153)
}

Leave a Reply