Learn creative coding writing simple programs

3. Create an animation, use random()

A short review. What happens if we forget a semicolon at the end of the line?
A little more detailed explanation of the display as a grid of pixels, with hundreds of rows and columns. We try out the function random() to make our program create a different image each time. Finally we try out the function draw() and background() to be able to animate lines and change the background color.

Tags: semicolon, pixel, draw, background, animation

Code editor

You can make changes to the code below. Then

Questions and comments

Try to stay close to the topic of this episode. Use the Processing forums for help with unrelated Processing projects (or hire me for help ;-)

To indicate that a word in your comment is code, use the `backtick`. Example
Do `float` and `int` smell similar?
To highlight code blocks, surround it with ``` code-fences ``` like this:
``` void setup() { size(600, 600); } ```