Learn creative coding writing simple programs

61. Draw shaky points, append items to an array

Arrays do not need to be of a fixed size. In previous episodes we created arrays that had a fixed amount of elements inside. This time we begin by creating an empty array, but we then make the array longer each time we click on the screen.
When we start the program we do not know how many times we will click the screen, so that's why we start with an empty array and make it longer with each click.

Tags: append, array, increase, length, software tutorial

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); } ```