Homework

image.png

I used the loop() function to draw a 5x5 grid of circles and made it into a unit. Then, I want to draw a smaller version of this 5x5 grid, but the result isn’t what I expected. I would like both units to scale from the center of the canvas.

image.png

I used translate() function to move the location of 0,0 to the center of the canvas.

image.png

Adding some flashing mouse effects.

https://editor.p5js.org/HanBao/full/08allAuM-