egrady – project1 – face

sketch

function setup() {
    createCanvas(500, 500);
    background(120, 200, 400);
    text("p5.js vers 0.5.12 test.", 10, 15);
    noStroke ();

    //background
    fill (0, 0, 0)
    rect (0, 0, 500, 100)
    rect (0, 200, 500, 100)
    rect (0, 400, 500, 100)


    //body
    fill (100, 10, 100)
    triangle (100, 500, 250, 250, 400, 500)   

    //head
    fill (255, 228, 196)
    rect(200, 100, 100, 250);

    //eyes
    fill (255, 255, 255)
    ellipse (200, 200, 50, 50);
    ellipse (300, 200, 50, 50);
    fill (0, 0, 0);
    ellipse (300, 200, 25, 25);
    ellipse (200, 200, 25, 25);

    //mouth
    fill (250, 128, 114)
    rect (175, 270, 150, 60)
    fill (0, 0, 0)
    rect (180, 275, 140, 50);
    fill (255, 255, 255)
    rect (180, 275, 22, 22)
    rect (210, 275, 22, 22)
    rect (240, 275, 22, 22)
    rect (270, 275, 22, 22)
    rect (298, 275, 22, 22)
    rect (180, 303, 22, 22)
    rect (210, 303, 22, 22)
    rect (240, 303, 22, 22)
    rect (270, 303, 22, 22)
    rect (298, 303, 22, 22)

    //hair
    fill (139, 69, 19)
    rect (195, 75, 20, 50)
    rect (225, 75, 20, 50)
    rect (255, 75, 20, 50)
    rect (285, 75, 20, 50)

    //nose
    fill (222, 184, 135)
    triangle (220, 250, 240, 210, 340, 260);

    //eyebrows
    fill (80, 50, 50)
    rect (175, 145, 50, 25)
    rect (275, 145, 50, 25)

}

function draw() {
}

Although it may not look like it, considering the fairly simplistic result, I actually had a difficult time working on this project. My programming experience is extremely minimal, and my grasp of mathematics is limited at best. However, I did enjoy the whole process involved in the creation of this piece. I attempted to use some of the more difficult elements to program, such as utilizing curvature (with lines) and arcs, but my attempts were not so successful. So as a result, I hope to learn how to employ some of the more advanced elements in p5.js over the weekend, so that I can utilize them on the next project. I feel that for this project I wish I could’ve incorporated more exciting and original elements, as opposed to just constructing a piece out of mainly rectangles and simple shapes. Upon viewing some of the other fantastic student pieces, I hope to eventually achieve that level of proficiency with programming, and be able to create a more exciting and ‘innovative’ piece of work that better represents the ideas that I have in my head.

Leave a Reply