Assignment 1: Aysha’s Self-Portrait

Concept:

For this assignment I use my knowledge of drawing basic shapes in p5*js to create a self-portrait. This portrait is a rough sketch of me, wearing my favorite hairstyle—a high ponytail. Since I’m still relatively new to coding, I chose to keep my approach simple by using basic shapes, lines, and curves to create this sketch. Understanding how the order of code affects the final drawing inspired me to stack shapes strategically, allowing me to capture minute details like the facial features in my portrait.

Highlight:

I’m particularly proud of the eyes in this sketch, as I invested a lot of effort into adding detailed elements that took some time to perfect. My biggest challenge was getting the curves right, especially when it came to the eyebrows and eyelids. Positioning them correctly was tricky, but using the mouseX and mouseY variables was incredibly helpful in determining their relative placement. However, achieving consistent curves across the sketch was the most time-consuming aspect of the entire process.

//eyes
fill(250);
ellipse(180,195,15,20);
ellipse(220,195,15,20);

noFill();
curve(175,230,167,190,194,190,200,230);
curve(180,240,206,190,235,190,220,220);
curve(200,170,167,200,194,200,200,150);
curve(200,155,206,200,235,200,200,170);

//eyebrows
curve(200,175,207,175,239,175,250,220);
curve(150,220,165,175,197,175,280,200);

Reflections:

When drawing the eyelids and eyebrows, I initially used the curve() function, but I later realized that combining noFill() with bezier() would have been a quicker and more efficient approach for creating curves. Additionally, I used the width and height variables to center the head on the canvas, which worked well. However, I believe that applying these variables more consistently throughout my sketch would make the portrait scalable for any canvas size in the future.

Leave a Reply