This is the video of my homework for week 3, and it’s a rotating sky wheel:
The basic function of this sky wheel is simple, you only need to press the mouse, and the wheel will begin rotate, and there will be bubbles coming out from the center and fly away. Also, there are “lights” on the sky wheel and they will blink while rotating.
Before pressed:
While pressed:
This basic logic for this sky wheel is that I created two classes, one is for the line on the wheel and one is for the bubbles.
For line(skyWheel) classes, each of the line on the sky wheel is an instances, and they are created with same size, same color but different coordinates. And they are of the form of vectors.
For bubble classes, each of the bubbles is an instance with random size, same initial velocity but random acceleration. In my code, I wrote bubble class as the subclass of line class, because I wanted my bubbles coming out from each endpoint of the line, however I didn’t figure out how to write that. So I will keep trying and try to find the way.