top of page
  • Writer's pictureKJ 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.

Recent Posts

See All

Nature of Code: Final Proposal

Link to video recording: https://youtu.be/_n7wWtambYc For the final, I would like to continue working on the mid-semester exercise. (link to mid-semester exercise: https://editor.p5js.org/kh1785/sketc

bottom of page