Learn creative coding writing simple programs

26. Make patterns by rotating objects

After many episodes moving things up, down, left and right, we introduce rotation. The rotate() function allows us to create rectangles that are not horizontal or vertical. If we make many of them using a while loop, we can create interesting patterns. For now we only rotate things around the top left corner of the screen. In future episodes we will discover how we can rotate objects around their own center (like when a CD or the wheels of a car spin).
The smooth() function makes the lines smoother, which you will notice a lot when you rotate rectangles.

Tags:

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