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
Link to this comment:
All Comments (0)