Learn creative coding writing simple programs

19. Tweak the bar-code, create your first function

This time we continue with the bar-code example from last episode. We create our first custom function. Functions can make the code easier to read. They are also useful to avoid repeating code: when the same group of lines is used multiple times in a program, it's a good idea to convert that group of lines into a function.
We also play a little bit with the numbers to see how they affect the image.


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