Recreation of “Girl With the Pearl Earring”

gpe submission size 

Recreating an image in program is hard, so I programmed drawing software so I could draw it myself.

I chose to create drawing software and draw Johannes Vermeer’s Girl With the Pearl Earring” rather than rendering shapes that resembled it. Why? Because writing a program that renders the painting with shapes is good for only that particular purpose. If something else needed to be displayed, the whole program would have to be rewritten. The program I wrote can be used to draw not only Pearl Earring, but anything that uses the included colors.

The full Processing code for the software is below.

void setup (){
size (590,845);
smooth ();
frameRate (100);
background(#000000);
}
color currentColor = #e4c0a6;
int currentSize = 3;
// #e4c0a6 = peach
// #4d59a3 = blue
// #7b2518 = red
// #eccc91 = yellow
// #966135 = brown
// #ffffff = white
// #000000 = black
// hitting enter clears the screen
//+ and – change brush sizes

void draw (){
// color starts as peach, size as 3

if (keyPressed == true){
if (key == ‘1’){
currentColor = #e4c0a6;
}
if (key == ‘2’){
currentColor = #4d59a3;
}
if (key == ‘3’){
currentColor = #7b2518;
}
if (key == ‘4’){
currentColor = #eccc91;
}
if (key == ‘5’){
currentColor = #966135;
}
if (key == ‘6’){
currentColor = #ffffff;
}
if (key == ‘7’){
currentColor = #000000;
}
if ((key == ‘-‘ || key == ‘_’)&& currentSize >= 3){
currentSize = currentSize-1;
}
if ((key == ‘=’ || key == ‘+’ )&& currentSize <= 99){
currentSize = currentSize+1;
}
if (key == ENTER){
background(#000000);
}
}
if (mousePressed == true){
noStroke ();
fill (currentColor);
ellipse (mouseX,mouseY,currentSize,currentSize);
}
}

Advertisements

About barberne

an animation student at alfred state from rochester
This entry was posted in Non Time-Based and tagged , , , , . Bookmark the permalink.