Creating Coding Lab Recitation 1

Here is the link to my project: https://editor.p5js.org/Derek-W-Eng/sketches/GaIcFWT6O

 

For this recitation, we were tasked with using p5.js to draw a sketch that we previously drew on paper. My sketch and its inspiration photograph were:

From these, I was able to code this image:

The coding was nothing special, I utilized the “rect” “line” “quad” and “ellipse” functions to draw out the line art, then used the “fill” function to color the image.

From this exercise, I was able to get a good handle on the basics of coding. I found the “rect” function to be a bit confused at first since it starts out using the top-left point of the rectangle instead of the center, but it was fairly easy to get used to. One thing that I found to be useful when I was coloring the drawing was labeling each “aspect” of the drawing in commented code. For example, I split up all the elements of the desk (legs, front, and top) into one section and then labeled it with “desk”. This made it easy for me to know where to put the “fill” function in order to color it. 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *