Project 01- Jasper Rogal

Jasper Face

function setup() {
  createCanvas(300, 200);
}

function draw() {
    background(76, 45, 143);
    //neck
    fill(253, 228, 200);
    rect(140, 140, 20, 70);
    //face
    ellipse(150, 150, 55, 65);
    //eye
    fill('white');
    ellipse(140, 140, 12, 10);
    ellipse(160, 140, 12, 10);
    //iris
    fill('brown');
    ellipse(140, 140, 6, 6);
    ellipse(160, 140, 6, 6);
    //pupil
    fill('black');
    ellipse(140, 140, 2, 2);
    ellipse(160, 140, 2, 2);
    //nose
    fill(253, 228, 200);
    triangle(150, 150, 148, 160, 153, 160);
    //mouth
    arc(150, 166, 10, 10, 0, PI, OPEN);
    //eylashes left side
    line(140, 134, 140, 131);
    line(136, 135, 136, 131);
    line(138, 134, 138, 131);
    line(134, 135, 134, 131);
    line(142, 134, 142, 131);
    line(144, 135, 144, 131);
    //eyelashes right side
    line(160, 134, 160, 131);
    line(162, 134, 162, 131);
    line(164, 136, 164, 131);
    line(166, 136, 166, 131);
    line(160, 134, 160, 131);
    line(158, 134, 158, 131);
    line(156, 135, 156, 131);
    //hair
    stroke('brown');
    line(mouseX, 105, 150, 116);
    line(mouseX+5, 105, 155, 118);
    line(mouseX+10, 105, 160, 120);
    line(mouseX+15, 105, 165, 122);
    line(mouseX-5, 105, 145, 118);
    line(mouseX-10, 105, 140, 120);
    line(mouseX-15, 105, 135, 122);
}

This is my first time coding. Also my hair is animated.

Leave a Reply