top of page
Search
  • Writer's pictureRyan Ramcharan

Assignment 2 Part 2- p5 Drawing

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)

}

2 views0 comments

Recent Posts

See All

Final project

https://editor.p5js.org/yoyoganesh32/sketches/tBvFFZ4P_ It is a robot that say's certain things when you press the button, 1-9, to make it stop talking you can press 0. I tried to make it have somewha

Assignment#8

https://www.tinkercad.com/things/fLtKmdw1xkI-assignment-8/editel I tried making one LEDs light up while the other LED is off and when you push the button the LED that was off will turn on and then the

Midterm Project

In my code, the car would have to move around the screen and avoid the balls that are on the screen. My intentions were to have a run away from the cops type of game. The three balls, red,blue, and wh

Post: Blog2_Post
bottom of page