Recitation 5: Processing Basics
Kevin From Minion
Freddie
I choose Kevin from Minion as the image I want to draw.
This is my sketch.
And this is the image I’ve drawn by processing coding. Here are the codes:
void setup() {
size (600, 600);
background(255);
}
void draw() {
fill(56, 97, 140);
quad(235, 400, 300, 400, 295, 555, 255, 555);
quad(300, 400, 365, 400, 345, 555, 305, 555);
ellipse(300, 425, 200, 200);
fill(245, 224, 80);
rect(190,320, 15, 225, 50, 0, 0, 0);
rect(395,320, 15, 225, 0, 50, 0, 0);
ellipse(300, 150, 200, 200);
rect(200, 150, 200, 300, 15);
fill(56, 97, 140);
rect(230, 350, 140, 100, 10, 10, 0, 0);
quad(200, 300, 240, 360, 230, 365, 200, 315);
quad(360, 360, 400, 300, 400, 315, 370, 365);
rect(260, 370, 80, 60, 5, 5, 30, 30);
rect(203, 440, 27, 10, 0, 0, 0, 180);
rect(370, 440, 27, 10, 0, 0, 180, 0);
fill(0);
ellipse(233, 357, 5, 5);
ellipse(367, 357, 5, 5);
ellipse(200,545, 20, 25);
ellipse(400, 545, 20, 25);
fill(20, 20, 20);
rect(245, 550, 50, 25, 50, 0, 10, 10);
rect(305, 550, 50, 25, 0, 50, 10, 10);
fill(255);
ellipse(250, 150, 100, 100);
ellipse(350, 150, 100, 100);
fill(255);
ellipse(250, 150, 80, 80);
ellipse(350, 150, 80, 80);
fill(30);
ellipse(225, 150, 30, 30);
ellipse(325, 150, 30, 30);
fill(255);
ellipse(220, 145, 10, 10);
ellipse(320, 145, 10, 10);
line(270, 300, 330, 300);
line(260, 290, 270, 300);
line(330, 300, 340, 290);
line(300, 50, 300, 15);
line(300, 50, 290, 20);
line(300, 50, 310, 20);
}