So this week we mainly learnt about variables.

I think I already understood what we talked about in class and the variables coding train videos, but nothing more than that. Well maybe a little bit because I used some p5js references.

For this week’s homework, I finished them all, but here are some problems:

the worksheet Q4:

截屏2025-09-18 00.27.08.png

The circle does move toward the mouse, but it also moves away the mouse…

worksheet Q5:

haven’t think of a way yet. I found the coordinates become complicated in my mind…

self portrait version 2:

  1. the way I animated the two pupils may not be correct, because using my way there will be some lagging for the right pupil.

Something like this may happen⬇️

截屏2025-09-18 00.30.22.png

  1. I set up the cheeks with a color changing function. right now, because of the maximum number for RGB value is 255, and I directly set the mouseX/mouseY as the g/b value variables, so the maximum mouseX/mouseY value is also 255, which means there’s one square area starting from (255,255) at the bottom right, that has no reaction and stayed white. does it have to be like this?
  2. I tried mouseDragged with mouth size and mouseClicked with the mouth color, but they didn’t work. I think it may because of there are multiple shapes in function draw() and I don’t know how to setup mouseDragged/Clicked with specifying the shape I want to change…

Coding Train videos exercises:

conditional statements

截屏2025-09-18 01.05.20.png

the bouncing ball