Assignment 2 Part 2- p5 Drawing
- Ryan Ramcharan
- Sep 8, 2020
- 1 min read
For my p5 drawing I tried creating a robot face from this picture I saw on google images. It is not exactly like the image I have but it is similar. The first image is from google, and the second is what I have coded. Down below my coded image I have listed my coding process to how I created the robot face.


function setup() {
createCanvas(900, 900);
}
function draw() {
background(400);
//Head
stroke('black')
strokeWeight(10);
fill(119,136,153)
rect( 125, 70, 620, 650)
//Rectangle (Mouth)
stroke('black')
strokeWeight(6)
fill(230,230,250)
rect(190, 500, 500, 175)
//Left Eyebrow
fill('black')
rect(175, 145, 150, 25)
//Right Eyebrow
rect(525, 145, 150, 25)
//Left Eyes
fill( 'red')
stroke('black')
strokeWeight(6);
ellipse( 275, 240, 100, 100)
//Left Pupil
fill('black')
ellipse(275, 240, 20, 20)
//Right Eyes
fill( 'red ')
stroke('black')
strokeWeight(6);
ellipse (575, 240, 100, 100)
//Right Pupil
fill('black')
ellipse(575, 240, 20, 20)
//Nose
fill(119,136,153)
stroke('black')
strokeWeight(9);
ellipse ( 435, 400, 100, 100)
//Left Ear Extension
stroke('black')
strokeWeight(6)
fill(119,136,153);
rect(70, 400, 50, 20)
//Right Ear Extension
stroke('black')
fill(119,136,153);
rect(750, 400, 50, 20)
//Left Ear
stroke('black')
fill(230,230,250);
rect(50, 385, 20, 50)
//Right Ear
stroke('black')
fill(230,230,250);
rect(800, 385, 20, 50)
}
Comments