Learn programming 37: make a rectangle dance using noise()

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
227 views
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Sep 10, 2011

Fun programming with Processing, episode 37. Our second experiment using the noise() function. In this case we make a rectangle move, rotate and resize using several calls to the noise() function. The noise() function takes one parameter. If you call noise() several times and the parameter is identical, you get back the same random number.
In our animation we call noise() five times with different parameters and we also try what happens when the parameters are equal. In that case it feels like the rectangle properties are linked. For example, moving to the right equals a larger rectangle, or moving to the right means a more clockwise rotation.
Try animating also the background color, the fill color, the stroke, and maybe change the different numbers in the program trying to predict which effect your change will produce. Can you make the rectangle move only on the left half of the display?

www.funprogramming.org

  • likes, 0 dislikes

Link to this comment:

Share to:
see all

All Comments (0)

Sign In or Sign Up now to post a comment!
Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more