Homework-1 Self-portrait

 

 

In this assignment we had to create our self portrait using functionalities of p5.js that we learned during the class. The task was enjoyable as it involved manipulating various shapes to create a visually appealing and coherent composition.

I started by creating a rough sketch, focusing on my face as the starting point. Drawing the face, eyes, and nose was not difficult as they could be easily represented with an ellipse and triangle. I had some issues adjusting the parameters of the arc to create a smiling face. I figured out manipulation of Pi to get perfect arc for my mouth using below code:

arc(200,230, 50, 30, TWO_PI + QUARTER_PI, PI - QUARTER_PI); //smiling mouth

 

For the background I chose sunny Abu Dhabi weather and created a sun using ellipse and blue sky using background color. For me the challenging part of this assignment was creating the body and hair of the self portrait. I used rectMode(CENTER); to center the rectangles and created the neck before the face so that it won’t be overlapping the face.

 

rectMode(CENTER); //centering the rectangles
fill('#F5BE86')
rect(200,280, 35, 40) //creating neck before face

fill('#8B67CE')
rect(200,345, 120, 95) //creating the main body

 

For the hair I used arc function and new parameter OPEN to get the best result. It took a lot of time to figure out the PI angles and adjusting it to fit the face. The below code draws the hair:

arc(width/2, height/2, 120, 150, PI+.4, -.4, OPEN); //drawing the hair

 

At the end as a final touch of authenticity I recreated one of my hoodies with NYUAD sign and Class of 2025 text. Overall, it was an amazing experience!

 

Leave a Reply