void setup() { size(1000,900); background(random(0,255),random(0,255),random(0,255)); } float r; float g; float b; float o; float x; float y; float xw; float yw; float xz; float yz; float diam; void drawCircles() { ellipseMode(CENTER); r= random(0,255); g= random(0,255); b= random(0,255); o= random(0,255); x= random(0,width); y= random(0,height); diam= random(height/2); stroke(r,g,b,o); fill(r,g,b,o); ellipse(x,y,diam,diam); } void drawRectangles() { rectMode(CENTER); r= random(0,255); g= random(0,255); b= random(0,255); o= random(0,255); x= random(0,width); y= random(0,height); diam= random(height/2); stroke(r,g,b,o); fill(r,g,b,o); rect(x,y,diam,diam); } void drawTriangles() { ellipseMode(CENTER); r= random(0,255); g= random(0,255); b= random(0,255); o= random(0,255); x= random(0,width); y= random(0,height); xw= random(0,width); yw= random(0,height); xz= random(0,width); yz= random(0,height); stroke(r,g,b,o); fill(r,g,b,o); triangle(x,y,xw,yw,xz,yz); } void newScreen() { background(random(0,255),random(0,255),random(0,255)); } void draw() { frameRate(10); smooth(); drawCircles(); drawRectangles(); drawTriangles(); if (keyPressed) newScreen(); }