top of page
Search

Assignment 2 Part 2- p5 Drawing

  • Writer: Ryan  Ramcharan
    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)

}

 
 
 

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...

 
 
 
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...

 
 
 
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...

 
 
 

Comments


Post: Blog2_Post
  • Facebook
  • Twitter
  • LinkedIn

©2020 by Ganesh Ryan Ramcharan Blog👨‍💻👨‍🎨. Proudly created with Wix.com

bottom of page