Drawing Machine

For the Processing Drawing Machine I decided to follow the assignment literally and make an actual drawing. This drawing is inspired by two drawings made by BTS’ V. The two faces are composed out of ellipses, rectangles, arcs, and a for loop. Even though these are all just simple shapes, the most time and complexity went into making these two faces as getting the measurements and placement right was very challenging. I would like to say that I am a pro now at getting the coordinates right. The oval shaped confetti like ellipses appear as you press on the mouse so that you can add on to this piece as you like. I decided on making the background a white color to keep it looking like a canvas that you can draw on as this is a drawing machine. I really love what I made and I’m glad that this was my first project because while making it I realized that as cool as it is that I’m drawing with code, I wasn’t using Processing to its full potential so for upcoming assignments I hope to use Processing in a different way than I did for this project.

Afnan Ellythy

void setup () {
size (800, 800);
background (255);

noFill ();
stroke(0);
strokeWeight (12);
ellipse (400, 400, 100, 100); //right eye

noFill ();
stroke(0);
strokeWeight(12);
ellipse (600, 400, 120, 120); //left eye

rect (530, 300, 150, 10); //left eyebrow
fill (0);

rect (350, 300, 100, 10); //right eyebrow
fill(0);

rect (520, 300, 10, 250); //right nose bridge
fill (0);

rect (450, 370, 10, 180); //left nosebridge
fill (0);

fill (0);
ellipse (400, 380, 50, 50); //left pupil

fill (0);
ellipse (600, 380, 65, 65); //right pupil

noFill ();
stroke(0);
strokeWeight(15);
ellipse (500, 600, 250, 100); //mouth

fill(0);
triangle(525, 555, 489, 490, 460, 555); //nose

noFill();
stroke(200, 0, 0);
arc(510, 635, 100, 40, PI+QUARTER_PI, TWO_PI); //smile/frown

noFill ();
stroke(0);
strokeWeight (5);
ellipse (100, 100, 90, 50); // left eye small

noFill ();
stroke(0);
strokeWeight (5);
ellipse (240, 100, 90, 50); // right eye small

fill (0);
ellipse (110, 115, 20, 20); //left pupil small

fill (0);
ellipse (250, 115, 20, 20); //right pupil small

fill(0);
rect (80, 60, 63, 5); //left eyebrow small

fill(0);
rect (190, 60, 93, 5); //right eyebrow small

fill(0);
rect (140, 60, 5, 120); //left nosebridge small

fill(0);
rect (190, 60, 5, 120); //right nosebridge small

fill(0);
rect(140, 165, 55, 15); //nose small

noFill ();
stroke(0);
strokeWeight(7);
ellipse (165, 220, 150, 80); //mouth small

noFill();
stroke(200, 0, 0);
arc(170, 240, 80, 20, PI+QUARTER_PI, TWO_PI); //smile/frown small
}

void draw () {
if (mousePressed ==true) {

pushMatrix();
noStroke ();
fill (random(0, 255), random(0, 255), random(0, 255));
translate(mouseX, mouseY);
for (int i = 0; i<5; i++) {
frameRate(30);
ellipse(5, 10, 12, 24);
}
popMatrix();
}
for (int i = 539; i < 650; i = i+1) { // nose bleed right
line(504, i, 509, i);
}
for (int i = 530; i < 550; i = i+1) { //nose bleed left
line(477, i, 482, i);
}
for (int i = 176; i < 215; i = i+1) { //nose bleed small
line(151, i, 154, i);
}
}