Step 1: Choose your motif
the picture on the left was the one I chose for recitation, and the right one was taken later that day after the recitation for halloween night when I asked someone to paint it on my face.
David Bowie. Aladdin Sane. 13 Apr, 1973.
I also referred to this picture from Wekippedia.
Without thinking twice, I chose the photo of David Bowie with his lightning on his face. The main reason for this is I do like the lightning design of this album and just took this photo of a poster earlier this Friday. Besides, I want to draw the lightning icon because it is formed of some simple geometric figures, which enables me to draw it in Processing.
Step 2: Draw your image on paper
Step 3: Draw your image with code
void setup() {
size(600, 600);
}
void draw() {
println (mouseX +"," + mouseY);
background(0);
fill(255,70,70);
quad(260, 120, 400, 120, 280, 280, 120, 320);
fill(255,70,70);
noStroke();
triangle(262, 270, 420, 230, 140,500);
fill(101,144,250);
stroke(0);
strokeWeight(5);
quad(259, 118, 279, 118, 146, 313, 120, 320);
fill(101,144,250);
noStroke();
triangle(233,292,246,289,140,500);
fill(255);
stroke(0);
strokeWeight(3);
arc(241, 310, 150, 150,PI+PI/4, TWO_PI-PI/4,CHORD);
noStroke();
arc(241, 205, 150, 150,PI/4,PI-PI/4,CHORD);
fill(0);
ellipse(241,258, 30, 48);
fill(random(255),0,200);
ellipse(241,258, 15, 24);
}
I referred to the functions below to finish my drawing:
http://processing.org/reference/ellipse_.html
http://processing.org/reference/triangle_.html
http://processing.org/reference/arc_.html
http://processing.org/reference/quad_.html
After the recitation, I adjusted my code to let the eye blinking, using “fill(random(255),0,200);
“, but it can not presented in the screenshot.
I think for this icon I chose, Processing is a good means to draw it with structured geometric figures. We can use code to precisely draw the shape and outline of it. What I think is difficult for Processing to do is to imitate the glittering texture of different paint materials on people’s faces.