void setup(){ size(600,600); frameRate(30); strokeWeight(0); smooth(); background(0); } void draw(){ background(0); Rectangle r=new Rectangle(); r.drawMe(); Circle c=new Circle(); c.drawMe(); } class Rectangle { float a; float b; Rectangle() { a=random(height); b=random(width); } void drawMe() { fill(255,0,0); rect(a, b, 35 ,35); } } class Circle { float c; float d; Circle() { c=random(height/2); d=random(width/4); } void drawMe() { fill(255,100,0); ellipse(c,d,35,35); } }