xxxxxxxxxx
24
function setup() {
createCanvas(400, 400);
angleMode(DEGREES);
}
function draw() {
background(220);
text("(" + mouseX + ", " + mouseY + ")", 10, 10);
translate(width/2,height/2);
rotate(45);
rect(0,0,100,100,0,50,50,50);
translate(0,120);
rotate(30);
rect(0,-150,100,100,0,50,50,50);
scale(1,-1);
rotate(-20);
rect(0,0,100,100,0,50,50,50);
scale(1,-1);
rotate(-100);
rect(10,-40,100,100,0,50,50,50);
// rect(0,0,100,100,0,50,50,50);
}