Documentation 6: Processing Basics

For my first drawing in processing, I wanted to create something simple and learn how to use the basic functions first. I chose this piece by Sol Lewitt because I liked how simple it was and the colors fit together quite well. While drawing in processing, I wanted to increase the thickness of each line I drew and then add the colors when necessary. I had come to realize that this would be a grave mistake, the only way I could color the image was by the “fill” function. After drawing my lines for the second box, I had to remove those coordinates and replace them with rectangles. I had an extremely difficult time processing the numbers and calculation in my mind. After adding the rectangles over the individual lines, it was difficult to figure out how to manipulate the thickness level to make the picture look more uniform.

The Motif:

My drawing:

My final creation still needs a lot of work before it looks like the photo in the model. Both images have the same outline and my second box has some of the coloring. However, I was not able to add the lines of the other two boxes because of time constraints. Processing was an okay means of realizing my design. Personally, it is really difficult to recalculate the numbers on the x and y axis’ so if there is a better method for that, it would be much more efficient to create these drawings.

The Code

void setup()

{

 size (600, 600);

 background(255);

 strokeWeight(10);  // Thicker

 line(20, 40, 580, 40);

 strokeWeight(10);  // Thicker

 line(20, 40, 20, 580);

 strokeWeight(10);  // Thicker

 line(20, 580, 580, 580);

 strokeWeight(10);  // Thicker

 line(580, 40, 580, 580);

 

 //inner lines

 strokeWeight(10);  // horizontal

 line(20, 300, 580, 300);

 strokeWeight(10);  // vertical

 line(300, 40, 300, 580 );

 

 //box 1

 strokeWeight(10);  // horizontal

 line(75, 40, 75, 300);

 line(130, 40, 130, 300);

 line(185, 40, 185, 300);

 line(240, 40, 240, 300);

 

 //box 2

 strokeWeight(10);  // horizontal

 

 fill(255, 255,0);

 rect (300, 40, 280, 40);

 

 //rect (300, 80, 280, 30);

 //line(300, 80, 580, 80);

 fill(255, 255,0);

 rect(300,110, 280, 30); // rect (x,y, width,height);

//  line(300, 110, 580, 110);

//  line(300, 140, 580, 140);

 

 line(300, 170, 580, 170);

 line(300, 200, 580, 200);

 line(300, 230, 580, 230);

 line(300, 260, 580, 260);

 

}

void draw()

{

}

Leave a Reply