top of page

Creating a Self-Portrait in Processing

samplesm_self_portrait_processing_final.png

Programs: Processing, Adobe Illustrator

Time Spent: 1 week

Completed: April 6, 2022

The goal for this project was to create an abstract self-portrait using Processing. Since I had never used Processing before, it was quite a challenge!

Processing is a programming language designed to help teach artists and designers how to program. It is well-suited to creating works of art.

 

First, I created a mood board to define the visual style for my portrait and creating some preliminary sketches. I decided to be inspired by the vaporwave aesthetic for this project.

Self-Portrait Sketch 2.jpg

After receiving feedback from my professor, I chose to go with the sketch to the left, where my face is framed by the triangle for the sense of balance that the composition has. The sketches below were less balanced due to the grid lines, which are common in vaporwave designs.

Self-Portrait Sketch 1.2.jpg
Self-Portrait Sketch 3.2.jpg

Pseudo-Code

Next, I wrote out the pseudo-code for my project. Pseudo-code is "code" written in a human language that helps the programmer plan which items to program and in which order to program them in. 

 

I later revised my pseudo-code to account for the fact that Processing will create the shapes that you coded last on top of the shapes you coded first.

 

So instead of drawing the background lines last (which would put them on top of my portrait), I switched their placement to the front of the code so that the lines will go behind the face.

portrait_for_real_pde _ Processing 3.5.4 4_4_2022 9_59_06 AM.png

Trial and Error

 I drew the portrait in Adobe Illustrator as I programmed it in Processing. I had two reasons for drawing the portrait in Illustrator. One, I could use the hex values for the colors I used in Illustrator to color the programmed portrait. Two, I could use the coordinates for the vertices of the shapes I drew in Illustrator to plot the vertices in Processing.

portrait_for_real3_pde 4_5_2022 10_16_41 AM.png
portrait_for_real5_pde 4_5_2022 3_01_10 PM.png

I discovered that using the curveVertex statement (which allows you to draw freeform, curvilinear shapes) with beginShape and endShape will actually close the shape with a straight line (and no stroke) instead of a curve. I looked up how to solve it, and it turns out that a lot of people have had this problem, but they did not have a solution.

 

I decided to solve this problem by adding more curveVertex points to my curvilinear shapes.

The images above show my process learning how to fix my curvilinear shapes.

portrait_for_real9_pde 4_5_2022 6_50_32 PM.png
Screenshot (2)_edited.jpg

Then, I encountered another problem.

For some reason, Processing did not put the vertex coordinates in the same place as on Illustrator (and I set both images as 500 x 500 pixels), so a lot of my work in Processing is gerrymandering the shapes so that they somewhat resemble what I had originally drawn.

 

The images above show the difference between the two portraits in progress. The left image shows my portrait in Processing, and the right image shows my portrait in Illustrator.

Here are are few screenshots showing my code in progress.

portrait_for_real5_pde _ Processing 3.5.4 4_5_2022 3_02_28 PM.png
portrait_for_real7_pde _ Processing 3.5.4 4_5_2022 4_24_25 PM.png

Final Portraits

samplesm_self_portrait_processing_final.png

Here is my final portrait in Processing!

Self-Portrait Illustrator 3_edited.jpg

And here is my final reference portrait from Adobe Illustrator!

Although my final portrait in Processing does not look exactly like my drawing in Illustrator, I learned a lot about using Processing and about translating images from one program to another!

 

bottom of page