• KJ Ha

Second Assignment

One element controlled by the mouse. The system variables mouseX, and mouseY allow the color of the tabletop to change according to the position of the mouse.

One element that changes over time, independently of the mouse. The two y positions of the liquid are updated frame by frame, independently of the mouse. These changes give an illusion that the height of the liquid is constantly changing. The speed of the animation can be controlled by the variable named "speed". What this variable really does is that it determines how much the y position changes per frame.

One element that is different every time you run the sketch. Every time the sketch is run, the color of stripes on the background is newly assigned by the random r, g, b numbers, using random(255).

The code can be found here: code.

© 2020 Kyungjoo Ha. All Rights Reserved