
. 

Link to sketch: https://editor.p5js.org/Kathryn-z/sketches/dDot1Wv3C
Q1. What are some ways (if any) that drawing on a piece of paper was easier than writing the program?
I think when drawing pictures on the paper, I don’t need to calculate the lengths and widths and maybe angles precisely as writing the program. The careful calculations do drive me crazy.
Q2. What are some ways (if any) that writing the program was easier than drawing on the piece of paper?
Since writing the program means that the computer can do all the drawings for me, it’s definitely easier when I have to draw straight lines etc. For example, I cannot draw a very round circle with my bare hands. The program can produce everything once I get all the codes right.
Q3. Problems and solution
I wanted to rotate a rectangle and wrote the rotate function directly. However, the rectangle only rotated around the top left corner.
Then I turned out to the Watch Code! Programming with p5.j and p5.j Reference. I found out that I should use the translate function first and change the first two parameters of the rectangle function to (0, 0).