Learn creative coding writing simple programs

32. Use a function to simplify a program

In this episode we simplify the program created on episode 30, with the four rotating rectangles. We write a function that creates a rotating rectangle. The function takes several parameters to modify it's behaviour. This way, the function can be used to create rectangles on different locations and with different sizes.


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