Continuing our experiments with rotation
Think of the rotate() function like sticking a pin into the top left (0,0) corner of our piece of paper (our canvas) and turning the paper around the pin axis.
float r = 0;
void setup() {
size(400,400);
background(10);
smooth();
noStroke();
}
void draw() {
fill(255);
rotate(r);
float circle_size = random(5, 15);
ellipse(100 + r, 10, circle_size, circle_size);
r = r + 0.2;
println(r);
}
Leave a Reply