float ang; void setup() { size (200,200); background (255); framerate (50); rectMode(CORNER); } void draw () { background (255); stroke(0,0,0,50); // black lines translate (100,100); //move origin of red square line(0,-width, 0, width); // vertical line line(-height, 0, height, 0); // horizontal line noFill (); stroke(250,0,0,50); //red square rect (0,0,50,50); rotate (ang); stroke(0,0,0); // black square noFill (); rect (0,0,50,50); ang+= TWO_PI/360; }