Animating Scale

Remember, you can use variables to control pretty much anything in Processing. This code changes the circle moving example to make it grow.
A handy shortcut: instead of saying circleSize = circleSize + 2, you can just say circleSize += 2.
x += 10x = x + 10
x -= 10x = x - 10
x *=10x = x * 10
x /= 10x = x / 10
x++x=x+1
x--x=x-1
int circleSize=1; void setup() { size(500,300); } void draw() { background(0); circleSize += 2; if ( circleSize > 200) { circleSize = 1; } ellipse(250,150,circleSize,circleSize); }

Variations: