SM1204 Introduction to Programming

Assignment 1

50685035 Bong Vivi

 

Still Graphics

image01

A simple graphic make of rectangles. By using of for loop and rotation, a flower-like graphic is created.

image02

Modify from image01, ellipse is substituded. Another pattern is drawn.

image03

A combination of ellipse and rectangles. Different patters can be created by changing the degrees of rotation.

 

Intercative Animation

animation01

Developed from the still image. Without clicking, the graphics can rotate according to the position of mouse.
This is the version of using rectangles only.

animation02

Developed from the still image. Without clicking, the graphics can rotate according to the position of mouse.
This is the version of using ellipse.

animation03

Trial version. To practise rotation.

animation04

Trial version. To practise rotation.

animation05


auto loop --> mouse pressing

A flower animation making by using rectangles. Once you click the mouse, the animation stops and no random color.

animation06


auto loop --> mouse pressing --> mouse released

A variation of animation05, this time, both ellipse and rectangles are used. And on clicking, no stroke but colorized.

animation07


auto loop --> mouse pressing --> mouse released

Similar to the above one. No use of ellipse.

animation08


auto loop (ellipse are close to the flower) --> distance becomes far away --> mouse pressing

Circles surround the flower and their distance is influenced by the mouseX and mouseY position.

animation09


auto loop (ellipse is zooming out) --> ellipse is zooming in --> mouse pressing

A practice of zooming in/out of an object.

animation10


auto loop (zooming in/out) --> mouse pressing variations

A practice of scaling. The flower zooms in and then out by itself. Click to see anything interesting.

animation11


auto loop (sizes of rectangles determined by mouseX,Y positions) --> mouse pressing (ellipse patterns formed)

Similar to the above example. But this time, the zooming degree is determined by mouseX/Y positions.

animation12


auto loop --> mouse pressed (diffrent patterns can be formed)

animation13


auto loop --> mouse pressed (diffrent patterns can be formed)

animation14


auto loop --> mouse pressed (diffrent patterns can be formed)

These three are the final animations for this assignment. They are also the most interactive one.
On clicking, the animation keep looping; once mouse is released, it stops and it will start again when mouse is pressed again.
Keep on clicking to obtain the most beautiful graphic.