https://editor.p5js.org/saramui/sketches/rzJfn0gDs
My approach to writing the program for my sketch was to simplify the shapes I had on my photograph to geometric shapes that existed within the program. I started with my desk, trying to play around with different pixel sizes for inputs until I had created a shape similar to my desk. This was when I discovered the function quad(), since my desk was not a perfect rectangle at the angle that I took my picture from.
My next step was to draw the lamp, which I had trouble with because of the shape of the base and the part that connects to the lamp. I figured out in my drawing that the base can be shown as a triangle on top of a trapezoid on an ellipse, which is how I ended up programming it. I had trouble with putting the shapes together, as I had initially thought that they needed to be lined up with correct coordinates and slopes, but I soon realized that I did not need to care about that, as each shape overlapped each other.
I then worked on my drawer, which became a problem for me. After coding each panel of my drawer, I decided that I did not like the placement of it in my drawing since I didn’t leave enough space for the mirror. I ended up moving the drawer multiple times, and looking for the correct coordinates to change was a little tedious.
Afterwards, I only had my computer, mouse, and mirror left, all of which went smoothly after the troubles I dealt with in the previous objects.
Even though I succeeded in completing this assignment and I learned many things along the way, I still prefer drawing on a piece of paper because the directions for what things to draw where are intuitive for us, but we have to manually type them for the computer to understand.
Leave a Reply