xxxxxxxxxx
26
let a = 0;
function setup() {
createCanvas(500, 500);
rectMode(CENTER);
angleMode(DEGREES);
}
function draw() {
background(220);
push(); // new origin coming!!!
translate(width/2,height/2);
// strokeWeight(5);
// point(0,0);
rotate(a);
rect(0,0,50,50);
pop(); // bring back the old
push(); // another new one
translate(width/2,height/2+100);
rotate(a);
rect(0,0,50,50);
pop();
a = a +1;
}