NOC – Week 3: Vectors – Keyin Wu(Quoey)

Here is the link for my assignment 3.

Basically it is consisted of rectangles and lines centered at the center of the screen. At first, I created a class which includes two rectangles and a line. The two rectangles are symmetric to the center point and have velocities in two directions. By applying the vectors, I gave rectangles an initial downward velocity and another velocity is along the line.

At first, there is nothing on the screen. By pressing the mouse, there will be a couple of rectangles and lines appearing on the screen with different sizes and velocities. 

The velocity of the rectangles will change according to their positions, but most of the time there exist rectangles with low speed and high speed at the same time. And as the number of rectangles increases, there will be certain 3D effect. Also, when the mouse moves, the system will rotate according to mouseX and mouseY.  

Here is a short demo:

Leave a Reply