Learn creative coding writing simple programs

9. Change screen size, animate colorful lines

We modify the last program we did (animated white vertical lines on black background) to make it more colorful. We see how to use the random function with two parameters instead of one. This way we get a random nomber that is between a minimum and a maximum value.
We also show how to change the screen size using the size() function to make it larger. When we don't use the size() function, the screen is by default 100 pixels wide and 100 pixels tall.

Tags: size, animation, random

Code editor

You can make changes to the code below. Then
Below you can ask and answer questions related to this video. If your question is unrelated to the video, please post it at the Processing Forum as I'm unable to help with all of your programs and still have enough free time to eat and sleep :)
comments powered by Disqus