For this week I improved my portrait with some new techniques that I learned from last class.
I tried to add some the face expressions and fake 3d effects of the portrait that changed by moving the mouse from left to right.
I found the connection between each arguments, x and y, and then change them into mouseX and mouseY based on their ratio.
I also added some self-driven animation to the background to make the whole thing more vivid.
For the worksheet, I got stuck in the Q6 challenge. I divided the conditional statement by four parts of the canvases, which can allow the rectangle gets smaller when it gets close to the edge of the canvases.
I tried for so long. At the end, I found I got to change the "if(mouseX<width/2, mouseY<height/2)" to "if(mouseX<width/2 & mouseY<height/2)". I have to use &, rather than use ",". Felt happy figuring it out.