Bhaboo’s Project 2

sketch
function setup() {
    createCanvas(480, 640);
    background(255);
    text("p5.js vers 0.9.0 test.", 10, 15);
}

//humans in current form 

function draw() {
    background(99, 197, 218);
    strokeWeight(3)
    fill(78, 53, 36, [255])
    ellipse(360, 240, 60, 80) //ear right
    fill(78, 53, 36, [255])
    ellipse(100, 240, 60, 80) //ear left
    fill(121, 92, 52, [255])
    ellipse(230, 270, 280, 320) //head
    fill(255, 255, 255, [255])
    ellipse(180, 220, 80, 64) //eye left
    fill(255, 255, 255, [255])
    ellipse(280, 220, 80, 64) //eye right
    fill(78, 53, 36, [255])
    ellipse(180, 200, 20, 20) //pupil left
    fill(78, 53, 36, [255])
    ellipse(280, 200, 20, 20) //pupil right
    fill(131, 92, 52, [255])
    triangle(230, 250, 200, 320, 260, 320) //nose
    fill(184, 63, 63, [255])
    arc(220, 260, 400, 200, 1, 2, 2) //mouth
    fill(0, 0, 0, [255])
    triangle(230, 60, 127, 160, 333, 160) //mohawk
    fill(255, 255, 255, [255])
    ellipse(378, 259, 7, 7) //pupil right

//monkey (humans pre-evolutionary form)
if (mouseIsPressed) {
    earValue1 = random(40,90)
    earValue2 = random(50,100)
    eyeValue1 = random(20,100)
    eyeValue2 = random(40,80)
    pupilValue1= random(10,20)
    pupulValue2 = random(5,30)
    toungeValue = random(40,120)
    background(150, 255, 150);
    strokeWeight(0)
    fill(78, 53, 36, [255])
    ellipse(360, 260, earValue1, 80) //ear right
    fill(78, 53, 36, [255])
    ellipse(100, 200, 60, earValue2) //ear left
    fill(121, 92, 52, [255])
    ellipse(230, 270, 280, 320) //head
    fill(255, 255, 255, [255])
    ellipse(180, 200, 100, eyeValue1) //eye left
    fill(255, 255, 255, [255])
    ellipse(280, 200, eyeValue2, 38) //eye right
    fill(78, 53, 36, [255])
    ellipse(180, 200, pupilValue1, pupulValue2) //pupil left
    fill(78, 53, 36, [255])
    ellipse(280, 200, pupulValue2, pupilValue1) //pupil right
    fill(131, 92, 52, [255])
    triangle(240, 230, 200, 300, 260, 310) //nose
    fill(184, 63, 63, [255])
    ellipse(194, 402, 64, 100) // tounge
    fill(184, 63, 63, [255])
    arc(230, 320, 200, 100, 1, 3, 4) //mouth
    
}
}

Leave a Reply