Learn creative coding writing simple programs

27. Animating while rotating

In our previous episode we used rotation and a while loop to create a pattern. We created and rotated many objects.
In this episode we animate using the rotate() function. On each frame of our animation (each time draw() gets called), we rotate our screen a little bit and then draw a circle. We repeat this over and over, so we see this circles spin around the 0,0 position. When we add some randomness to the size of the circles an interesting pattern appears.

Tags: rotate, animate, 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); } ```