Rongshan Liu

Group Sketch

I work with Dipika on our sketch Squares. We decided that one of us codes the if statement and the other one codes the output behaviors.

I start to work on it first so I designed many squares whose color changes with the move of mouse. And I did the if statement that allows changes to be made when mouse is over each squares.

Sketch of my part

I also complete the sketch myself with the output behaviors. I found it so hard to come up with 16 different outputs. So I combined some of them to make a chain of effects.

Sketch I complete

Worksheet

For the worksheet, I think the 2nd and the 4th are more difficult, especially the 2nd one. I thought for almost 1h trying to figure out how to make the color only change once instead of keep flashing like this:

屏幕录制2022-09-22 上午11.40.26.mov

I drew and wrote it down. I thought the key might be the edge of the rectangle in the middle. And I though: It would be great if there was something that could represent the mouseX of the previous second. It turned out there is indeed a thing called pmouseX. So the problem solved.

Untitled

For the 4th question I cannot imagine how to add time in p5. So I went to the workshop and learned frameCount and %. I think when you know the right function it would be so easy to achieve the effect you want, but the process of identifying the key and essence of the problem and clarify the logic is so much fun.