xxxxxxxxxx
21
function setup() {
createCanvas(800, 800);
angleMode(DEGREES);
rectMode(CENTER)
noLoop();
}
function transformedRect () {
fill('yellow')
translate(Math.random()*width,Math.random()*height);
rotate(Math.random()*360);
rect(100,100,50,50);
resetMatrix();
}
function draw() {
background(220);
for (let i = 0; i < 500; i++) {
transformedRect()
}
}