In this exercise, I got a picture about how to use translate() and rotate() functions. It's quite useful to perform translation of the shape to the desired position. When I was working on this practice, I drew three rectangles with diverse colors and rotating angles by applying rotate(angle) syntax. Then, the most important thing that I need to notice is the effects of rotation are cumulative. I also found that while I using rotate() after a translate() will generate a different effect than the reverse. After I finished the work, I have earned more experience about transforming shape to any position.
HW07-2: Easing Motion
To continue the previous exercise, this time I just need to rotate those three rectangles by introducing a variable "easing". Then, I made the rotate(angle) function multiplied by a "easing" value which will increase every time by means of adding "easing++" command. So that these rectangles can start to rotate. After this assignment is done, I also use frameRate() syntax to control the rate of rotation. In the beginning, I was thinking that it must be a tough task, but after the easing variable comes out, everything go along in the right direction.
No comments:
Post a Comment