NOC – Week 2: Objects (Wentao)

This is the link to my project: https://editor.p5js.org/ww1025@nyu.edu/sketches/v2tnzjhFj

For this project, I created a basic canvas like this. Black background with a gray square in the middle; two lines crossing at the center.

When you press the mouse, ellipses will occur from the position of the mouse and move around. If you locate your mouse inside the square, the ellipses will just move randomly. 

And if you move your mouse to different directions in the canvas outside the square, the ellipses will gain speed in that direction and move toward that certain area in the canvas.

NOC – Week 1: p5 basics (Wentao)

For this assignment, I mostly focused on the function of mouse position and mouse pressed function.

When moving the mouse around the canvas, you can change the background color according to the position of the mouse.

When you click the mouse, a white ellipse will appear at the position of the mouse and will move around with the moving of the mouse.

When you press the mouse, the size, color, and transparency of the ellipse will change randomly. And when you stop pressing the mouse, the color will change back to white again.