Project 1

This is my self portrait, enjoy!!

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

function draw() {
    background(random(0, 140), random(0,0), random(10, 140));
   
    strokeWeight(2)
    fill(206,116,144);
    triangle(246,313.5,0,515,500,515) //shirt

    strokeWeight(2);
    fill(255,242,172);
    triangle(347,428,299.4,379.6,271.5,442) //collar bone 1

    strokeWeight(2);
    fill(255,242,172);
    triangle(191.6,385,143.43,428.2,220.5,444) //collar bone 1


    strokeWeight(2);
    fill(255,242,172);
    triangle(143.43,428.2,347,428,246,490) //chest



    strokeWeight(.5)
    fill(206,116,144);
    ellipse(243.5,160,220,120) // hat 1

        fill(196,131,215)
    rect(129,158,230,100); // hair

    strokeWeight(4); 
    fill(255,242,172); 
    triangle(355,250,129,245,246,490); //jaw
    strokeWeight(4);

    // RELOAD THE PAGE FOR DIFFERENT COLORS!!!!
    fill(223,186,117);   
    triangle(281,293,197,292,241,231); //nose
   
    fill(223,186,117);
    triangle(225,243,175,174,129,242); // eye
   
    fill(223,186,117); 
    triangle(255,244.47,306,171,354,246); // eye

    fill(255,242,172);
    triangle(304,172,180,175,241,267.5); //bridge of nose

    fill(random(200,255),random(0,0),random(200,255));
    ellipse(307.81,218.91,60,25); //eye hole

    fill(random(200,255),random(0,0),random(200,255));
    ellipse(180,218.91,60,25); //eye hole
    
    fill(223,186,117); 
    triangle(255,210,306,171,354,210); // eyelid
    

     fill(223,186,117); 
    triangle(135,210,186,171,234,210); // eyelid


    strokeWeight(7)
    stroke(150)
    noFill();
    ellipse(307.81,218.91,90,50); //glass 1
    noLoop()

        strokeWeight(7)
    stroke(150)
    noFill();
    ellipse(180,218.91,90,50); //glass 2
    noLoop()

    line(225,218.91,262.81,218.91) //glass bridge
    
    
    strokeWeight(0)
    fill(random(50,150),0,random(50,150)); 
    triangle(199,313,273,314,234,373); // mouth

    stroke(1)
    strokeWeight(6);
    fill(206,116,144);
    triangle(234.5,198.5,350.5,160,137.9,160) //hat brim



   

}

Leave a Reply