CyclingBackground

```processing void setup() { size(500, 500); frameRate(60); }

void draw() { background((millis() * 0.1) % 256, (millis() * 0.2) % 256, (millis() * 0.3) % 256); } ```

DrawText

```processing void setup() { size(200, 200); textSize(32); textAlign(CENTER, CENTER); }

void draw() { background(200); text(“Hello”, width/2, height/2); } ```

ExpressionsExample

```processing void setup() { println(5 * (2 + 3)); // evaluates to 25; } ```

GrowingCircleBackground

```processing void setup() { size(500,500); }

void draw() { background(0); fill(255,0,0); circle(250, 250, 10*second()); } ```

GrowingCircleFaster

```processing void setup() { size(500,500); background(0); }

void draw() { fill(255,0,0); circle(255, 255, 10*second()); } ```

GrowingCircleModulo

```processing void setup() { size(500, 500); frameRate(60); }

void draw() { background(0); fill(255, 0, 0); circle(250, 250, (millis() * 0.05) % 400); } ```

GrowingCircleSmooth

```processing void setup() { size(500, 500); frameRate(60); }

void draw() { background(0); fill(255, 0, 0); circle(250, 250, millis() * 0.05); } ```

GrowingCircleWeek1

```processing void setup() { size(500,500); background(0); }

void draw() { fill(255,0,0); circle(250, 250, second()); } ```

GrowingCircles

```processing int dia=10; void setup(){ size(400,400); } // draw() calls mousePressed(), // if you miss draw() mouse pressed will be ignored void draw(){ }

void mousePressed(){ fill(random(255),random(255),random(255)); circle(mouseX,mouseY, dia); dia = (dia+10) % 200; } ```

LineToMouseXMouseY

```processing void setup(){ size(400,300); }

void draw(){ background(255); line(0,0,mouseX,mouseY); println(width,height,mouseX,mouseY); } ```

Panda

```processing int startingPointX,startingPointY;

void setup(){ size(400,400); startingPointX = width/2; startingPointY = height/4; }

void draw(){ background(255); fill(255); circle(startingPointX,startingPointY,100); fill(0); circle(startingPointX-40,startingPointY-40,40); circle(startingPointX+40,startingPointY-40,40); startingPointX++; } ```

RandomBubbles

```processing void setup(){ size(400,400); frameRate(4); }

void draw(){ background(0); fill(255,0,0); circle(random(width),random(height),50); } ```

RedCircleFallingDown

```processing int yPos=0; //global variable

void setup(){ size(300,700); }

void draw(){ background(255); fill(255,0,0); circle(width/2, yPos, 50); yPos = (yPos + 2) % height; } ```

RedCircleFallingDownText

```processing int yPos = 0; // global variable

void setup() { size(300, 700); }

void draw() { background(255); fill(255, 0, 0); circle(width/2, yPos, 50); fill(0); text(yPos, 10, 20); yPos = (yPos + 2) % height; } ```

RotatingLine

```processing void setup() { size(400, 400); }

void draw() { background(255); line(0, 0, 200 + cos(TWO_PI * millis() / 1000.0) * 100, 200 + sin(TWO_PI * millis() / 1000.0) * 100); } ```

VariableAssignment

```processing int score = 0;

void setup() { size(200, 200); score = score + 10; // adds 10 to score println(score); } ```